I have a PHP script that selects all the messages from a database where topic = $topic and forum = $forum... That works... But the ordering is all screwed up... So, I thought, that's easy, I'll just write ORDER BY id (id is a column I made so I can select one message at a time for editing and deleting)... That would make sense, right? But now, it goes:
blahblah (id 9)
blahblah (id 8)
blahblah (id 7)
blahblah (id 6)
blahblah (id 5)
blahblah (id 14)
blahblah (id 13)
blahblah (id 12)
blahblah (id 11)
Why is it doing this? Here is my exact PHP code:
mysql_db_query("michal", "SELECT * FROM allmessages where topic = '".$topic."' AND forum = '".$forum."' ORDER BY id DESC;");
What should I change, or how can I get around this bug?
blahblah (id 9)
blahblah (id 8)
blahblah (id 7)
blahblah (id 6)
blahblah (id 5)
blahblah (id 14)
blahblah (id 13)
blahblah (id 12)
blahblah (id 11)
Why is it doing this? Here is my exact PHP code:
mysql_db_query("michal", "SELECT * FROM allmessages where topic = '".$topic."' AND forum = '".$forum."' ORDER BY id DESC;");
What should I change, or how can I get around this bug?