As you may have guessed, you should use a keyword . LIMIT
It takes two meanings (citation):
- first line offset to return
- maximum number of rows to return
- :
select * from your_table order by ... limit 0, 50
, :
select * from your_table order by ... limit 50, 50
:
select * from your_table order by ... limit 100, 50
; -)
:, , URL-, :
http:
:
$offset = 50 * intval($_GET['pagenum']);
:
select * from your_table order by ... limit $offset, 50
URL- URL-:
http:
http:
http:
...
, 700 50 , 700/50 ;-)
, - :
for ($i=0 ; $i<700/50 ; i++) {
// Use http://www.example.com/page.php?pagenum=$i as URL
}
, 700 - , , , : count:
select count(*) as total
from your_table
...