viewing search result

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Everybody,

Please help me in this,
I have a search page, when people search they keywords and the result is 50
rows from mysql , how to display them page by page which each page contain
20 results , thanks in advance :


str_replace(' ','%',$searchwords);

$query="select * from table where colom like '%$searchwords%'  order by id
desc ";
$result=mysql_query($query);
$numresult=mysql_num_rows($result);

if (mysql_num_rows($hasil) > 0 ) {
echo ("<b>Found :</b> $searchwords <br><br>");



//page display
I have tried my own recipe but didn't work....




while ($data=mysql_fetch_array($result)) {
echo ("

<tr>
    <td width=\"330px\"><font size =\"3\"><br>$data[colom1]<br><br></td>
    <td width=\"50px\"><p align =\"center\"><font size
=\"2\">$data[colom2]<br></td>
    <td width=\"50px\"><p align =\"center\"><font size
=\"2\">$data[colom3]<br></td>
 </tr>
");



Best Regards,
Hadi Tjen

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux