richcleverley
MIS
OK, I knwo that pagination has been dealt with loads of times bur I am really not getting anywhere with my own script so here goes.
I have this code that pulls out data and displays the search results (display is called from an include file which I won't include here)
I want to only display 10 results and have links to the next results pages etc.
Can anyone help at all. Many thanks in advance.
Richard
I have this code that pulls out data and displays the search results (display is called from an include file which I won't include here)
Code:
require('conf.php');
include('head.html');
//query database for propeties
$people1 =$people ;
$people1 ++;
$query="SELECT pid, pname, pshortdescription, picture, sleeps, baths from properties WHERE (sleeps = '$people' or sleeps = '$people1')";
$result= mysql_query ($query);
while (list($pid, $pname, $pshortdescription, $picture, $sleeps, $baths ) = mysql_fetch_row($result)){
include('azur/tpl/displayresults.tpl');
?></p><?
}
include('footer.html');
?>
I want to only display 10 results and have links to the next results pages etc.
Can anyone help at all. Many thanks in advance.
Richard