Questions tagged by "paginator"


0
 bounty
0
answers
PHP Pagination Last id record
10 years ago • lampego1@qrid
I've the following Pagination code : $rec_limit = 3; /* Get total number of records */ $query = "SELECT count(id) FROM news"; $result = mysql_query($query); if(!$result) { die('Could not get data: ' . mysql_error()); } $row = mysql_fetch_array($result, MYSQL_NUM ); $rec_count = $row[0]; if( isset($_GET{'page'} ) ) { $page = $_GET{'page'} + 1; $offset = $rec_limit * $page ; } else { $page = 0; $offset = 0; } $left_rec = $rec_co
Tags: , ,
1 from 1