/** * Function gets all the product details for the selected category id * * * @return string */ function showProducts() { if ($_GET['id'] != '') { $_SESSION['catid'] = $_GET['id']; $sql1 = "SELECT category_id,subcat_path from category_table WHERE FIND_IN_SET(" . $_GET['id'] . ",subcat_path)"; $res1 = mysql_query($sql1); while ($row1 = mysql_fetch_array($res1)) { $fromdate = $row1['category_id']; $result[] = $fromdate; } $categoryid = implode(',', $result); $sql = "SELECT * FROM products_table where category_id IN({$categoryid})"; $query = new Bin_Query(); if ($query->executeQuery($sql)) { $totrows = $query->totrows; } if ($totrows > 0) { return Display_DFeaturedItems::productList($query->records); } else { return Display_DFeaturedItems::productList($query->records); } } else { return 'Select SubCategory'; } }