10.12.2012, 12:07
Hello.
I have a little question.
I am trying to make log file in SQLite, so I can access it from not only SA-MP.
The problem is about sorting. I don't know how to display rows with biggest unix timestamp (recent added row).
To imagine you, what I am about, then take look at this table:
+---Table: Log
Date|xFrom|Text
123|abc|Yoyo
124|abb|Yoto
546|xxd|Hello
695|pwn|amx
+--------------|
If I will use this script:
Will print:
And now, what do I have to do if I want to display it in this order?
Is there any way from pawn level to sort all data from table using ORDER BY expression?
Or do I have to do something else?
Greetz,
LetsOWN.
I have a little question.
I am trying to make log file in SQLite, so I can access it from not only SA-MP.
The problem is about sorting. I don't know how to display rows with biggest unix timestamp (recent added row).
To imagine you, what I am about, then take look at this table:
+---Table: Log
Date|xFrom|Text
123|abc|Yoyo
124|abb|Yoto
546|xxd|Hello
695|pwn|amx
+--------------|
If I will use this script:
pawn Код:
for(new i = 1; i < db_num_rows(db_Result); i++)
{
format(db_Query, 255, "Select xFrom from Log where rowid = 'i');
..
}
Код:
abc abb xdd pwn amx
Код:
amx pwn xdd abb abc
Or do I have to do something else?
Greetz,
LetsOWN.