Hi Andres, > I have what probably is a basic question, but can't figure out by > myself. If > any of you kind souls can point me in the right direction I would > appreciate > it. > > I have a db table that has these columns: > id, date, time, title, body > > some of the rows can have the same "date" and want to output the data > according to "date". Like so: > > dateA > timeA1, titleA1 > bodyA1 > > timeA2, titleA2 > bodyA2 > > dateB > timeB1, titleB1 > BodyB1 > > etc. > > Think of a weblog structure. I know how to output the information row by > row, but not like above. Can any of you help me?
=use PHP to loop through the resultset: retrieve data while not eod //loop through resultset retrieved echo //output the blank line echo date while date_unchanged and not eod //loop through all the records for one day echo time, title echo body echo //output the blank line end while //date loop end while //resultset loop NB I use a function to return a data row from the resultset and flag eod as a boolean eod = end of data (in the resultset) =welcome to programming! =dn -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]