ok i know how to connect to the mysql database and all that jazz. The question i have is lets say i have 2 columns: 1)city(ex. baltimore) 2)food(ex. cookies) there are several cities in the database and they reappear all the time, same with the food column what i want to show is a list of cities where lets say the food 'cookies' appears most often and ordered from most to least, and also wondering how i can have it only show all the cities with cookies has come up in the food column atleast 5 times
you can use the "group by", try a query like: select cookie, count(cookie) as count, city from comments group by cookie order by count desc use "where" .....where cookie > 4 I suggest to read any basic sql tutorial