This is probably an easy one, but my brain is frazzled and I need to get this done.
I have two tables in one databse.
One is a list of shops with information such as name and address etc.
The other table contains submitted information about those shops, including two fields, one that is set to '1' or true when the customer thinks that overall the shop is "good" and another that is set to '1' or true if the customer feels overall the shop is 'not good'.
I would like some advice on the most efficient way to run through all the shop_ids and count the number of 'good' and 'not good' "votes" each shop has recieved, and store this in an array for displaying. Ie an array for each shop with the number of good and bad votes stored in the array to use later in the script.
I know I could use several queries to achieve this, but I am sure there must be a clean and efficient way of doing this.
Any help much appreciated.
Paul