lostcities Posted September 19, 2007 Share Posted September 19, 2007 My basic scenario is i am doind a discography for a band. I have set u a table (disco_darling) for id, title, albumArtSrc, credits, and have also set up a table (tracklisting_darling) for id, track01, track02, track03, track04 etc up to track20, i have put information into the tables and displaying the information from disco_darling is sorted and works fine, but the tracklisting_darling data i want to display each field in a new <li> within an ordered list so: <li>$row->track01</li> <li>$row->track02</li> and so on. And i am confused how to loop it to do this? Any help would be most appreciated! //Mark Link to comment https://forums.phpfreaks.com/topic/69924-listing-retrieved-fields/ Share on other sites More sharing options...
BlueSkyIS Posted September 19, 2007 Share Posted September 19, 2007 first, select using an order by on track name, if that's all you have. Ideally, you'd have a field for track order as well, otherwise you're stuck either listing the tracks alphabetically or adding a numeric prefix in front of each track name to identify it's order. then loop over the record set using while ($line = mysql_fetch_array($result)) { // do stuff here; } Link to comment https://forums.phpfreaks.com/topic/69924-listing-retrieved-fields/#findComment-351201 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.