Try something like this...
Code:
<?
/* Domain count here */
if($count == 0){
echo "No results";
}
else if($count > 0){
echo "Results";
}
if(!isset($_GET['page'])){
$page = 1;
} else {
$page = $_GET['page'];
}
$max_results = 25;
$from = (($page * $max_results) - $max_results);
/* We set the row count to 0 */
$row_count = 0;
/* We set the current page number to 1 */
$x='1';
/* Next we run an sql statment and run a while loop to output the search results */
$get_results = mysql_query("SELECT * FROM table WHERE something LIKE '%$srch%' AND something_else LIKE '%$category%' LIMIT $from,$max_results");
while($row = mysql_fetch_array($get_results)){
$row_1 = $row[FIRST_ROW];
/* This line determines the color of the next row */
$row_color = ($row_count % 2) ? $color1 : $color2;
echo "Table here...";
/* We tell the script to run again */
$row_count++;
}
// Figure out the total number of results in DB:
$get_count = mysql_query("SELECT * FROM table WHERE something LIKE '%$srch%' AND something_else LIKE '%$category%'");
$total_results = mysql_num_rows($get_count);
// Figure out the total number of pages. Always round up using ceil()
$total_pages = ceil($total_results / $max_results);
?>
Bookmarks