Hi, Instead of doing a SELECT *, specify the fields that you require. Allthough you may think the rows are exactly the same, one might be empty ("") and one null which is not the same.
You are more likely to get the result that you need if you specify the fields: SELECT DISTINCT somedata, rev, andthis FROM rev ORDER BY rev By the way, having "rev" as a name for your table AND as a fieldname is confusing and not advisable. Rgds, Jos -----Original Message----- From: MIGUEL ANTONIO GUIRAO AGUILAR [mailto:[EMAIL PROTECTED] Sent: 17 May 2005 04:26 To: php-db@lists.php.net Subject: [PHP-DB] Select Hi!! I have this query in PHP: $items2 = mysql_query("SELECT DISTINCT * FROM rev ORDER BY rev", $link); I have three rows with the same data on it, and DISTINCT seems to be not working, since I got all the rows, any ideas of what is going wrong? -------------------------- MIGUEL GUIRAO AGUILERA Logistica R8 - Telcel -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php