I have a simple script for search but thing is it displays all the result in one page… What I want is that it should first 10 results in first page, another 10 in 2nd page and another 10 in 3rd page and so on… In such a way to decrease server load (have minimal quires)and also conserve bandwidth…
I am posting the functioning part of search script here… Can someone help me adding pagnition to it… Help will be highly appreciated…
<?
include "config.php";
if (@$_POST'search']=="search")
{
$keyword=$_POST'keyword'];
$result=mysql_query("SELECT * FROM websites WHERE `title` LIKE '%$keyword%' OR `url` LIKE '%$keyword%' OR `description` LIKE '%$keyword%' ");
while ($results = mysql_fetch_array($result))
{
$title=$results'title'];
$url=$results'url'];
$description=$results'description'];
echo "$title $description $url";
}
}
?>
Re: PHP MYSQL Gurus, Please help with pagnition...
Thanks, but I don't need suggestion. I need help. I already searched google and try implimenting code but couldn't succeed. I need someone who can modify above code in a way to add pagnation and reduce quiries...
Re: PHP MYSQL Gurus, Please help with pagnition...
I tried many of those google results... But I couldn't do it. I am finding it really hard to implement tutorials in the "search" script above... But I desperately need pagnition in the script... Isn't there anybody on the forum who can help :(