Group By

admin

Administrator
Staff member
I'm new to both MySQL and PHP. I have a database call that's pulling data based on location. When the user selects "All" for the location, it pulls all locations. The problem is that some shops (chains) exist in two locations, so I'd like to group by location to make the ouput more logical.

Is there a way to do this? I can use the Group By in MySQL, but because I don't really know what I'm doing yet, I pull only the first record of each group.

Thanks in advance for any insight you might have.

Olga
 
Back
Top