pepe_lepew1962 — 2011-04-10T16:29:15-04:00 — #1
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');
spacephoenix — 2011-04-10T17:41:10-04:00 — #2
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
r937 — 2011-04-10T18:12:51-04:00 — #3
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