Jump to content

How to apply Limit on Result of Records.


man12_patil3

Recommended Posts

limit 0,5  - first five

limit 5,5 - skip first five, select next five

limit 10,5 - skip ten

 

you need to write code like this:

$page = isset($_GET['page']) ? (int) $_GET['page'] : 0;
$query = 'Select * from tabName Limit ' . ($page *5) . ', 5';

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.