Re: [PHP-DB] Unique SQL query?????????????
Try adding 'distinct' before the field you are selecting. -Lisi At 01:42 AM 6/8/02 +0100, Georgie Casey wrote: Is there any SQL command that will return a list of *unique* entries from a fied. ie only repeat one for duplicates i have a database of products, each having a category, and obviously a lot of products have the same category and I want to create an index of all the different categories. thanks -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Online Film Production Directory *** -- 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
Re: [PHP-DB] Unique SQL query?????????????
On Saturday 08 June 2002 08:42, Georgie Casey wrote: Is there any SQL command that will return a list of *unique* entries from a fied. ie only repeat one for duplicates i have a database of products, each having a category, and obviously a lot of products have the same category and I want to create an index of all the different categories. SELECT DISTINCT category FROM products -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Ocean: A body of water occupying about two-thirds of a world made for man -- who has no gills. -- Ambrose Bierce */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php