Category
$query = "select * from tbl_aquarium order by aquarium_name";
$hasil_sql = @mysql_query($query,$conn);
while ($baris = @mysql_fetch_assoc($hasil_sql))
{
?>
}
?>
Video Link
$jumlah = 0;
$query = "select * from tbl_video order by date_video desc";
$hasil_sql = @mysql_query($query,$conn);
while ($baris = @mysql_fetch_assoc($hasil_sql))
{
++$jumlah;
if (!empty($baris["file_image1"]))
{
if ($jumlah>10) break;
?>
}
}
?>
|
if ($category=="ALL")
$query = "select tbl_category.*,tbl_product.* from tbl_category,tbl_product where tbl_product.category_id = tbl_category.category_id order by tbl_category.category_id,product_id";
else
$query = "select tbl_aquarium.aquarium_name,tbl_job.* from tbl_aquarium,tbl_job where tbl_aquarium.aquarium_id= '$category' and tbl_job.aquarium_id = tbl_aquarium.aquarium_id order by tbl_job.date_job desc, tbl_job.job_name";
$hasil_sql = @mysql_query($query,$conn);
$ada = @mysql_num_rows($hasil_sql);
if (!isset($page)) $page=1;
$tpage = $ada/30;
$upage = $ada/30;
settype($upage,"integer");
if ($tpage>$upage) $upage+=1;
$xpage = 1;
if ($page>1) $xpage=$page-1;
$ypage = $upage;
if ($page<$upage) $ypage=$page+1;
if ($page>1)
{
$ybar = ($page-1)*30;
for($xbar=0;$xbar<$ybar;++$xbar) @mysql_fetch_assoc($hasil_sql);
}
if ($ada)
{
$xbar = 0; $xkol=0;
?>
}
?>
|