Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

DBMS 

SQL - Limits not working - limits doubling.

Hi,

I think you got the usage of LIMIT wrong.

Code
Select * from countries ORDER BY country LIMIT 10,20 ;

The above statement will basically return you the 20 results after the 10th element. Please try the following code

Code
'Select * from countries ORDER BY country LIMIT '.($limit - 10) .',10'

in the $db->query() statement.

I'm no expert in programming and using this platform to learn myself so I apologize in advance if this doesn't help you. Hope this helps though.

Good luck;
Leather.