27.01.2016, 00:25
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
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]
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"
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]