Omitting duplicate data on the database

I can’t seems to locate the problem with this code? All I need is to omit the duplicate record from displaying. Kindly guide me on the right path.

[php]
<?php
$array_result = mysqli_query($con,“SELECT batch_no FROM ExcelData”);
$unique_array = mysqli_fetch_array($array_result);
while($row = array_unique($unique_array)) {

					echo "<tr><td>";
					echo $row['batch_no'];
					echo "</center></td>";
					echo "</tr>";
					echo "	</div>";
				}
			
				?>

[/php]

Hi,

Sorry for the trouble. I found the solution on the net. listed below in bold letter.

$array_result = mysqli_query($con,“SELECT batch_no FROM ExcelData WHERE 1 GROUP BY batch_no”);

Sponsor our Newsletter | Privacy Policy | Terms of Service