$query = mysql_query("SELECT * FROM products WHERE product ='$id'") or die ("Unable to get product list from the database.");
while ($view = mysql_fetch_array($query)) {
print $product;
}
The thing is I want to know how to ignore duplicate entries when printing out the products....
i have a field called $name where there will be duplicate entries...
$query = mysql_query("SELECT DISTINCT FROM products WHERE product ='$id'") or die ("Unable to get product list from the database.");
while ($view = mysql_fetch_array($query)) {
print $product;
}
Where I use the Distinct clause is a little bit different then your application of it. I tried several dif ways of trying to get the results you are looking for from a quick sample db and I couldn't, I am wondering if they might be a better way to structure your table or tables to get the desired results.
Any one esle with some bright