I'm trying to increase the offset every time by 3, so I used a variable that is increased by 3 every time a button is clicked (using ajax).
However, I keep getting a syntax error when using
$web = "SELECT * FROM `db` WHERE catid = 9 AND state = 1 ORDER BY ordering LIMIT 0,".$_POST['limit']." OFFSET ".$_POST['limit']."";
There was an error running the query [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OFFSET 3' at line 1]
The syntax should be:
LIMIT ".$_POST['limit']." OFFSET ".$_POST['limit']."";
0 conflicts with