Your SQL statement is not selecting the 10 newest entries. It is selecting the last 10 entries when ordered by "name". That's a subtle difference I know, but if "name" is a string then you'll get the last 10 in descending alphabetical order. Try ordering by id. Also, your LIMIT clause is technically correct, but you don't need the 0. 0 is the default offset, so LIMIT 0,10 is the same as LIMIT 10.
|