FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

inverting order

 


ChrisCh
Heya. Does anyone know how to invert this (to make the order reverse, so that it shows in decending order, not ascending):
Code:
$sql = "SELECT * FROM messaging WHERE to_user='$curruser2' order by msg_id";
shamil
ChrisCh wrote:
Heya. Does anyone know how to invert this (to make the order reverse, so that it shows in decending order, not ascending):
Code:
$sql = "SELECT * FROM messaging WHERE to_user='$curruser2' order by msg_id";

Use this
Code:
$sql = "SELECT * FROM messaging WHERE to_user='$curruser2' order by msg_id desc";
ChrisCh
Thanks for that. 'Tis working beautifully Smile
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.