php - How do I limit an already limited query? -
how can limit query limited?
the thing is, i'm dividing results pages, , in case, done limit
(is there other way it...?), using limit again seems impossible. obviously, if have ideas on how can done in php instead (simple code, please), post it.
use offset
e.g.
[limit {[offset,] row_count | row_count offset offset}]
the offset calculated doing this
$offset = ($page-1) * $pagesize
the select
select ... yourtable limit $offset, $pagesize
Comments
Post a Comment