Styles2304 Posted August 11, 2007 Share Posted August 11, 2007 ok, here's my code again: while ($row = mysql_fetch_array($result)) { $entrydate = $row['EntryDate']; $data = $row['Data']; $announcements .=<<<EOD <table with="100%" cellpading="0" cellspacing="0" border="0"> <tr> <td colspan="2"> <font class="h3"> $entrydate </font> </td> </tr> <tr> <td width="5"> </td> <td width=*> <font class="h3"> $data </font> </td> </tr> </table> <table width="100%"> <tr> <td colspan="2"> <hr width="70%"> </td> </tr> </table> EOD; } echo $announcements; ?> I also have an entry in my database called index number, is there a way to have it spit out each block of announcements based on the order of the index numbers? For example, the first entry is 1, second is 2 and so on and so on but on the website, I want it spit them out in reverse order so that it's in the order they were posted. Link to comment https://forums.phpfreaks.com/topic/64450-solved-displaying-data-based-on-database-entry/ Share on other sites More sharing options...
Psycho Posted August 11, 2007 Share Posted August 11, 2007 You need to do it in your query. Something like SELET * FROM table ORDER BY index DESC Link to comment https://forums.phpfreaks.com/topic/64450-solved-displaying-data-based-on-database-entry/#findComment-321336 Share on other sites More sharing options...
Styles2304 Posted August 12, 2007 Author Share Posted August 12, 2007 it's always so simple! lol thanks! Link to comment https://forums.phpfreaks.com/topic/64450-solved-displaying-data-based-on-database-entry/#findComment-321337 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.