//echo "SELECT * from subcategory where category_id='".$Category_id."' and status='1' and image_upath!='' order by id desc";
$sel_product_rows = mysql_query("SELECT * from common_news where status='1' and image_upath!='' $category_sqry $brand_sqry order by sorting_order desc limit $offset,$entries_per_page");
$tot_product = mysql_num_rows($sel_product_rows);
if($tot_product >0)
{
$i=0;
while($product_details = mysql_fetch_object($sel_product_rows))
{
$i=$i+1;
$row_id = $product_details->id;
$pcategory_id = $product_details->category_id;
$psubcateory_id = $product_details->scategory_id;
$title=$product_details->title;
$image_upath=$product_details->image_upath;
$sel_product_cat_name = mysql_query("select * from subcategory where id='".$product_cat_id."' and status='1'");
$fetch_product_cat_name = mysql_fetch_object($sel_product_cat_name);
if($image_upath !='')
{
$thumb_img_src = '';
$img_folder_path = 'uploads/common-news-images/';
$img_filename_arr = explode($img_folder_path, $image_upath);
if(file_exists($img_folder_path.'300-'.$img_filename_arr['1']))
{
$thumb_img_src = $img_folder_path.'300-'.$img_filename_arr['1'];
}
else
{
if(file_exists($image_upath))
{
$thumb_img_src = $image_upath;
}
}
}
else
{
$thumb_img_src = '';
}
?>
} } ?>
if($num_rows ==0) { echo ' No Data Found!!!';} if($num_rows >12) { echo $pagination;} ?>