Sports Categories
$user="sportsto_sportst";
$host="localhost";
$password="mitchell";
$database="sportsto_sports";
$connection=mysql_connect($host,$user,$password)
or die ("couldn't connect to server");
$db=mysql_select_db($database,$connection);
$limit=100;
$query_count="SELECT count(distinct category) as total FROM sports";
$result_count=mysql_query($query_count);
$totalrows=mysql_num_rows($result_count);
$page = $_GET['page'];
$row=mysql_fetch_array($result_count);
$totalrows = $row['total'];
if(empty($page))
{
$page = 1;
}
$limitvalue = ($page * $limit) - $limit;
$query = "SELECT distinct category FROM sports order by category LIMIT $limitvalue,$limit";
$result = mysql_query($query) or die("Error: " . mysql_error());
?>
|
$limit=100;
if($page != 1){
$pageprev = $page-1;
}
$numofpages = ($totalrows / $limit);
for($i = 1; $i <= $numofpages; $i++){
if($i == $page)
echo($i." ");
else
echo("$i "); //removed $ in front of page
}
if (floor($totalrows / $limit) != 0) {
if($i == $page)
echo($i." ");
else
echo("$i ");
}
if(($totalrows - ($limit * $page)) > 0){
$pagenext = $page+ 1;
}else
mysql_free_result($result);
?>
|
|
Optronics Motion Pro 1000 Remote Control Spotlight

Optronics Motion Pro 1000 Remote Control Spotlight
Perfect for nighttime hunting, Optronics Motion Pro 1000 Remote Control Spotlight lets you spot varmints while you set your sights from another position. |