Let say I retrieve my list of data…
First
$Query = mysql_query("SELECT * FROM data ORDER BY name ASC LIMIT 0,30");
From there I am using AJAX/jQuery to to append an additional 30 records. Which I need to call another file where the query will pick up where I left off.
Second
$Query = mysql_query("SELECT * FROM data WHERE name < '".mysql_real_escape_string($_GET['lastRecord'])."' ORDER BY name ASC LIMIT 0,30");
My question is, if I have the first query order the first 30 by name, how can I write the second query to pick up where I left off in that order?
Change the LIMIY like this – LIMIT 30, 30
BTW, you tagged this as jQuery and it isn’t.