|  | Posted by Andy Hassall on 08/06/05 13:49 
On Sat, 06 Aug 2005 10:42:33 GMT, Mike <user@domain.com> wrote:
 >	$cur_page = $_GET['next_page'];
 >	$page_num = $cur_page + 1;
 >	$record = ($cur_page * $records_per_page) + 5;
 >	$total_num_page = $last_page_num = ceil($total_recs/
 >$records_per_page);
 >
 >	$limit_str = "LIMIT ". $cur_page * $records_per_page . ", $record";
 
 http://dev.mysql.com/doc/mysql/en/select.html
 [LIMIT {[offset,] row_count | row_count OFFSET offset}]
 
 It's not LIMIT from_offset, to_offset.
 it's LIMIT offset, row_count.
 
 So surely something more like:
 
 $limit_str = "LIMIT ". $cur_page * $records_per_page . ", $records_per_page";
 
 --
 Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
 <http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
  Navigation: [Reply to this message] |