mysql/php loop on date ...

Discussion in 'PHP' started by pepe_lepew1962, Apr 10, 2011.

  1. #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');
    //
     
    pepe_lepew1962, Apr 10, 2011 IP