At a first glance, it looks like you are missing parameters for the LIMIT part.
LIMIT, as its name implies, limits your results to the set amount.
Ex:
|------table: vb3_bankbalance-------|
// not even remotely my real bank records, i wouldn't be that stupid.
id, in, out, balance
1, 0.00, 10.00, 560.00
2, 300.00, 0.00, 860.00
3, 0.00, 50.00, 810.00
4, 0.00, 20.00, 790.00
5, 100.00, 0.00, 890.00
6, 0.00, 500.00, 390.00
7, 100.00, 0.00, 490.00
|------end--------|
$DB_site->query("
SELECT balance
FROM " . TABLE_PREFIX . "mybankrecords
LIMIT 2,7
");
Should grab rows 2 -> 7 and leave row 1 in the database.
A 'LIMIT' can't have no parameters. That's probably why you are getting that error, anyway.
|