[Solved] how to only select unique items from the database [duplicate]


You need Distinct

$result = mysqli_query($db,"select DISTINCT names from uploadedproduct");

Distinct optimization allows to select only unique rows. The above query selects distinctively but case insensitive. For it be case sensitive, you could use BINARY opeartor:

$result = mysqli_query($db,"select DISTINCT (BINARY names) from uploadedproduct");

1

solved how to only select unique items from the database [duplicate]