Im not sure how to ask this, but which is better... using GROUP BY or multiple tables.
Currently, I have one table that generates lists. It has several columns, one is a list id.
Right now this is my query
SELECT `listID`, ``Â
WHERE `churchID`='".$thisID."' AND `timeSent` >= DATE_SUB( CURDATE( ) ,INTERVAL 0 MONTH )Â
GROUP BY `listID` ASC
The point of course is to get all items associated with the same listID. Then I pass that ID to another query in order to display my list titles. AKA...
SELECT * FROM `acmSongLists` WHERE `listID`='$listID'"
I am curious, Is there a better way of doing this? My other thought was to create two tables, one that holds the general information as well as a unique id (listID) then a second table that holds each item within the list. Then query them respectively. I guess I'd like to know what is the most efficient. Thanks for your thoughts.