|
|
 |
Getting new records
Kevinneke | Posted 3:21am 3. February 2009 Server Time |
Hi all,
I want to get the latest records from a database, starting with a specific id.
SQLstmt = "SELECT x.* FROM (SELECT * FROM Chatlog WHERE Kamer='algemeen' ORDER BY ID DESC LIMIT 0,max(`id) - " & session("aantal_records") & ")x ORDER BY ID ASC"
But this isn't a correct statement. Can I use max in a SQLquery or is the best way to execute 2 query's (one for getting the highest record id number and one to get the latest records, by the use of the highest record id session)?
Thanks!
-Kevin.
|
To post a message to this discussion you need to be
a Haneng.com member. If you already are a member please log in
if not register as a member here (free).
|
|
|
|
 |
|