FRIHOST • FORUMS • SEARCH • FAQ • TOS • BLOGS • COMPETITIONS
You are invited to Log in or Register a free 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
Related topics
Inverting / Backwards Web Page ???
What order shoudl you learn them?
Order forms and Chat rooms; How to? ?
JOy Divison/New Order
Beginning Programming... Help!
=-=close=-=thkz in advance=-=
[man]Photoshop: Tutos en español.
-<[ Get the website of your greatest desires!!! ]>-
Could somebody test out my order form?
Does anyone know the chronological order of the FF series?
Wrong order
Javascript - order of loading
Harry Potter & The Order Of The Pheonix
New World Order
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

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