include("controls/common-files.php"); include("controls/header.php"); $rs_products=mysql_query("select product.*,product_image.product_image_large,product_image.product_image_thumb,product_image.product_image_medium from product LEFT JOIN product_image on product_image.product_id=product.product_id AND product_image_id=( SELECT min(product_image_id) FROM product_image WHERE product_image.product_id= product.product_id) where product.product_id=".$_GET['product_id']." AND isactive=1 ORDER BY product_id ASC"); $product=mysql_fetch_array($rs_products); $product_name = $product['product_name']; $product_id = $product['product_id']; $product_category_id = $product['product_category_id']; $product_sub_category_id = $product['product_sub_category_id']; $product_name = $product['product_name']; $product_pdf = $product['product_pdf']; ?>
$res_products_image=mysql_query("select product.product_id,product_description.desc_title,product_description.product_description,product_description.product_desc_id from product LEFT JOIN product_description on product_description.product_id=product.product_id where product.product_id=".$_GET['product_id']." AND isactive=1 ORDER BY product_id ASC"); ?> $sel_relt_products="select * from product where isactive=1 AND product_id!=".$product_id." "; if($product_category_id>0) { $sel_relt_products= $sel_relt_products." AND product_category_id=".$product_category_id.""; } if($product_sub_category_id>0) { $sel_relt_products= $sel_relt_products." AND product_sub_category_id=".$product_sub_category_id.""; } $sel_relt_products =$sel_relt_products." GROUP BY product.product_id LIMIT 4"; $rs_relt_products=mysql_query($sel_relt_products); if(mysql_num_rows($rs_relt_products)> 0) { ?> } ?> include("controls/footer.php"); ?>