Jump to content

Using "Limit"


Ham

Recommended Posts

the limit x,y syntax only works with offsets (row number). If there was no deletions in your table, this would work fine, but if some items were deleted, an id would not be the correct offset anymore.

 

maybe this is what you need:

SELECT * FROM table_name WHERE id >= $primary_key ORDER BY id ASC LIMIT 10;

Link to comment
https://forums.phpfreaks.com/topic/2537-using-limit/#findComment-8420
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.