Hello, I am in great need for a loop on a group of records. Basically I need a loop on the date field and pull all those records for that date, then loop onto the next date in the table. If I had 3 records for 04/03/2011, dispaly them, then grab the next date, say 04/06/2011 and display all of those records. It is probably very simple, but not simple enough for me, can anyone help with this please.
tblTable02.fldName2 // Date Field
$result = mysql_query('SELECT tblTable01.fldName1, tblTable01.fldName2, tblTable01.fldName3, tblTable02.fldName1, tblTable02.fldName2 FROM tblTable01, tblTable02 WHERE (tblTable01.fldName1 = tblTable02.fldName1) ORDER BY tblTable01.fldName1, tblTable02.fldName2');
Can you post the output of a "SHOW CREATE TABLE" query for each of the three tables concerned?
I think this is more of a database (MySQL) problem.
Thread moved to the MySQL forum
although if tblTable02.fldName2 is the date field, it has to come first in the ORDER BY
but the guts of the solution are php