bri4n Posted October 1, 2007 Share Posted October 1, 2007 Hi guys! This is a simple one, but I just can't seem to figure out what I've screwed up! I have a form that the user fills in (and in the background I store the time/date that the form was submitted into a MySQL database). That's ok...everything works fine there. But what I am wanting to do is to list all the people that have submitted the form, and list them according to the time they submitted the form. here is what I have, but I just can't seem to see what's wrong with the code: $query = ("SELECT firstname, lastname, email, phone FROM userinfo ORDER BY time") or die(mysql_error()); $result = mysql_query($query); Any ideas as to what I've stuffed up? ??? TIA Brian Link to comment https://forums.phpfreaks.com/topic/71315-solved-ordering-problem/ Share on other sites More sharing options...
The Little Guy Posted October 1, 2007 Share Posted October 1, 2007 $query = ("SELECT firstname, lastname, email, phone FROM userinfo ORDER BY time DESC") or die(mysql_error()); $result = mysql_query($query); Link to comment https://forums.phpfreaks.com/topic/71315-solved-ordering-problem/#findComment-358811 Share on other sites More sharing options...
bri4n Posted October 1, 2007 Author Share Posted October 1, 2007 Hi Little Guy! Thanks for that...I changed the "DESC" to "ASC" and it works perfect. Thanx, Brian :-) Link to comment https://forums.phpfreaks.com/topic/71315-solved-ordering-problem/#findComment-358818 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.