$objConnect = mysql_connect("localhost","winsdeno","xYEcfD7ur8-") or die("Error Connect to Database");
$objDB = mysql_select_db("winsdeno_membersystem");
$strSQL = "SELECT * FROM supplier WHERE type LIKE 'Food' OR type LIKE 'Food Ingredients' OR type LIKE 'Restaurant' OR type LIKE 'Catering' OR type LIKE 'Bars' OR type LIKE 'Catering' OR type LIKE 'bakery'";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$Num_Rows = mysql_num_rows($objQuery);
$Per_Page = 8; // Per Page
$Page = $_GET["Page"];
if(!$_GET["Page"])
{
$Page=1;
}
$Prev_Page = $Page-1;
$Next_Page = $Page+1;
$Page_Start = (($Per_Page*$Page)-$Per_Page);
if($Num_Rows<=$Per_Page)
{
$Num_Pages =1;
}
else if(($Num_Rows % $Per_Page)==0)
{
$Num_Pages =($Num_Rows/$Per_Page) ;
}
else
{
$Num_Pages =($Num_Rows/$Per_Page)+1;
$Num_Pages = (int)$Num_Pages;
}
$strSQL .=" order by type ASC LIMIT $Page_Start , $Per_Page";
$objQuery = mysql_query($strSQL);
?>