Forum Moderators: coopster
On my HTML I want to start at row 'x' and show a total of 'y' rows.
I can specify the starting row and total to display through a URL and use GET to, well, get them.
But I'm not finding how to specify in a query to show rows 5-15, or 10-20, 35-45.
Any ideas?
Thanks in advance!
SELECT * FROM mytable WHERE something='something' LIMIT 10, 10;
That query will return 10 rows, offset by 10. So if you had 100 rows it would return the rows 10-20. You can use your imagination to get what you want out of it. Different databases have different methods of returning an offset/limit, so this is only valid for MySQL as far as I know (and maybe postgresql).