include('include.php'); $mode = $_REQUEST[mode]; $var_msg = $_REQUEST['var_msg']; $productcategory_id = $_REQUEST['productcategory_id']; $sql_cat = "select c.catid, c.catname from category as c join products as p on p.product_cat=c.catid where c.access = 'Unblock' and p.product_access='Unblock' and p.product_of='bhoomi' order by c.displayorder,c.catid DESC"; $db_cat = $obj->select($sql_cat); if($productcategory_id==""){ $productcategory_id = $db_cat[0]['catid']; } $sql_catgry = "select c.catid, c.catname from category as c join products as p on p.product_cat=c.catid where c.access = 'Unblock' and p.product_access='Unblock' and p.product_of='bhoomi' and c.catid ='".$productcategory_id."'"; $db_catgry = $obj->select($sql_catgry); //Fetching the products fields $db_query = "select * from products as p join subcategory as s on p.product_subcat=s.subcatid join category as c on p.product_cat=c.catid where c.access = 'Unblock' and s.access = 'Unblock' and p.product_access='Unblock' and p.product_of='bhoomi' and product_cat='".$productcategory_id."' LIMIT 0 , 9"; $db_res = $obj->select($db_query); $db_query_pat_pg = "select count(*) as tot from products as p join subcategory as s on p.product_subcat=s.subcatid join category as c on p.product_cat=c.catid where c.access = 'Unblock' and s.access = 'Unblock' and p.product_access='Unblock' and p.product_of='bhoomi' and product_cat=".$productcategory_id; $db_res_pat_pg = $obj->select($db_query_pat_pg); $num_totrec = $db_res_pat_pg[0]["tot"]; ?>