Jump to content


Photo

invert results


  • Please log in to reply
3 replies to this topic

#1 adam_gardner

adam_gardner
  • Members
  • Pip
  • Newbie
  • 9 posts

Posted 15 April 2006 - 09:27 AM

hi guys,

sure this is real simple for the pro's i just don't know the operator or whatever to make it work.

my msgID field is unique, so - SELECT * from messages ORDER by msgID

works fine

but how would i invert the order (so msgID 3 showed above 2 etc.)

thanks for the help!

Adam

#2 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,016 posts

Posted 15 April 2006 - 09:38 AM

SELECT * from messages ORDER by msgID DESC
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts

#3 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 15 April 2006 - 09:39 AM

[!--quoteo(post=365024:date=Apr 15 2006, 09:27 AM:name=adam_gardner)--][div class=\'quotetop\']QUOTE(adam_gardner @ Apr 15 2006, 09:27 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
hi guys,

sure this is real simple for the pro's i just don't know the operator or whatever to make it work.

my msgID field is unique, so - SELECT * from messages ORDER by msgID

works fine

but how would i invert the order (so msgID 3 showed above 2 etc.)

thanks for the help!

Adam
[/quote]

lookup rsort
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#4 adam_gardner

adam_gardner
  • Members
  • Pip
  • Newbie
  • 9 posts

Posted 15 April 2006 - 10:37 AM

damn, i knew it would be so simple!

thanks!

adam




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users