Small help [SQL sorting data. Oldest to newest]
#1

Alright so Ive got this small problem of mine, not really a problem just something Id like to change now Id better ask someone thats more experienced with me with this.

The code I have works great, but there is 1 thing Id like to change, thats sorting of it, Id like to display the code in a way from the oldest to newest.

Ie current display. Lets says I send last 50 messages to the player that he typed in, it will first load the newest one, so it will end on top.
Message 50 <- sent first
Message 1 <- Sent last

I want of it to be
Message 50 < Sent last
Message 1 < sent first

code
PHP код:
"SELECT `Message` FROM `ic_chat` WHERE `Name`='%e' ORDER BY `ID` DESC LIMIT 50" 
Small description about the code
1. It loads LAST 50 messages player entered & sends them to player requesting the log [Works]
2. Sends message that was oldest and then goes to newest one [Works other way around at the moment]
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)