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);
?>
Bowling Gear
Enjoy thousands of other bowlers in one of the most fun sports played indoors, bowling. Practice knocking all those pins down with our videos or find the right bowling ball and bowling apparel that fits your style.