Eggzorcist Posted June 15, 2012 Share Posted June 15, 2012 Hi there, I was just wondering if there was a straightforward command to fetch info from the db but only unique fields? For example, I have a product list and each products belongs to a category that is user generated. I want to make a category list. but there are hundreds of categories with maybe 8-15 categories. How can I fetch the categories while only fetching 1 variable per category? If someone can point me in the right direction that would be great! Link to comment https://forums.phpfreaks.com/topic/264261-fetching-sql-data-removing-duplicates/ Share on other sites More sharing options...
Pikachu2000 Posted June 15, 2012 Share Posted June 15, 2012 SELECT DISTINCT field FROM table Link to comment https://forums.phpfreaks.com/topic/264261-fetching-sql-data-removing-duplicates/#findComment-1354247 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.