Hi all,
Why doe sthe below never display the first row in the database table? It displays the second and third rows but on the same page.
Why is this?
// 1) Perform Question Query
$query = "SELECT question_ID, question_text ".
"FROM questions";
//echo $query;
$result = mssql_query($query) or die('Select Query Error');
/******************************
Pagination Setup
******************************/
$query_data = mssql_fetch_row($result);
$numrows = $query_data[0];
$rows_per_page = 1;
$lastpage = ceil($numrows/$rows_per_page);
$pageno = (int)$pageno;
if ($pageno < 1) {
$pageno = 1;
} elseif ($pageno > $lastpage) {
$pageno = $lastpage;
} // if
$limit = 'LIMIT ' .($pageno - 1) * $rows_per_page .',' .$rows_per_page;
/*****************************/