desjardins2010 Posted December 7, 2010 Share Posted December 7, 2010 ok so this code here is working find in regards to fetching the users name and ID number however it's just putting them in any order I want the first user to be user 1 and then 2 then so forth? would a simple for loop do this if so before or after my while loop? or would I even need a while loop? Link to comment https://forums.phpfreaks.com/topic/220948-a-little-confusion-goes-along-way/ Share on other sites More sharing options...
Pikachu2000 Posted December 7, 2010 Share Posted December 7, 2010 Uh, what code? Link to comment https://forums.phpfreaks.com/topic/220948-a-little-confusion-goes-along-way/#findComment-1144081 Share on other sites More sharing options...
litebearer Posted December 7, 2010 Share Posted December 7, 2010 Pika - need to take a class in ESP and mind reading Link to comment https://forums.phpfreaks.com/topic/220948-a-little-confusion-goes-along-way/#findComment-1144092 Share on other sites More sharing options...
shlumph Posted December 7, 2010 Share Posted December 7, 2010 If you're using a DB, you'll want to do the ordering at the DB level. If you're using MySQL you can append "ORDER BY ID ASC" to the end of your query. But as mentioned, posting the relevant code would help, you could be getting data from a CSV file for all we know. Link to comment https://forums.phpfreaks.com/topic/220948-a-little-confusion-goes-along-way/#findComment-1144118 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.