error_reporting(E_ALL ^ E_NOTICE); include('db/application_top.php'); define('TABLE','tbl_specials'); $mode = $_REQUEST['mode']; $sort = $_REQUEST['sort']; if($mode=="") $mode = "asc"; if($sort=="") $sort = "ordering"; $rowsPerPage = 9; $pageNum = 1; if(isset($_REQUEST['page'])) { $pageNum = $_REQUEST['page']; } if($_POST['p']!="") # jump to the page requested for.. :) { $pageNum = $_POST['p']; } $offset = ($pageNum - 1) * $rowsPerPage; $sql = $db->query("SELECT * FROM " .TABLE." ORDER BY ordering asc LIMIT $offset, $rowsPerPage " ) ; $specs = array(); while( $result = mysql_fetch_array($sql,MYSQL_ASSOC) ) { $specs[] = $result; } $countTaker = $db->query("SELECT * from ".TABLE." ORDER BY ordering asc "); $no_of_rows =$db->get_count(TABLE); include("includes/paging.php"); ?>