search limit
Posted: Tue Dec 08, 2009 9:22 am
Can anyone show me or point me in direction of a tutorial that limits search results
1) i want to limit the number of rows that will show up in total eg 500 / 998 so only the 500 can be viewed.
2) i also want to display 10 results per page and have link to next 10 and previous 10 as well as option to jump straight to page ?
1) i want to limit the number of rows that will show up in total eg 500 / 998 so only the 500 can be viewed.
2) i also want to display 10 results per page and have link to next 10 and previous 10 as well as option to jump straight to page ?
Code: Select all
$result = mysql_query ("SELECT * FROM table_name WHERE column_name LIKE '%$search_entered%' ");
$row=mysql_num_rows($result);
echo "<table>";
while($row=mysql_fetch_array($result))
{
$column1 = $row["column1 "];
$column2 = $row["column2 "];
$column3 = $row["column3 "];
echo "<td>$column1 <td>";
echo "<td>$column2 <td>";
echo "<td>$column3 <td>";
}
echo "</table>";