Page 1 of 1

[SOLVED] ORDER BY datetime Problems

Posted: Sat Apr 02, 2005 12:42 pm
by cbrian
This code is part of a message board I'm making. This query gets the topic and the replies made to it, but it seems like the replies are ordered randomly, even though I've used ORDER BY `posted`

Code: Select all

$query = mysql_query("SELECT * FROM forum WHERE replied_to='{$_REQUEST['post']}' ORDER BY `posted` DESC");
It's a lot of code, and I think this is the only part that would really affect it.


EDIT: Sorry for wasting your time. I made a dumb mistake, it should be ordered ASCENDING. It works great now.

Posted: Sat Apr 02, 2005 12:45 pm
by feyd
post your table structures in SQL format, an export of some data stored in it, and what that data is being output as, versus what you want it to output as.