1 record set 3 possibilities
Hey Ray
On the site that you helped me with yesterday, the shop_category_results_s.php is being used to return product details using
<?php
$maxRows_Categories = 24;
$Categories = new WA_MySQLi_RS("Categories",$DBConnection,$maxRows_Categories);
$Categories->setQuery("SELECT productcategories.*, products.*, productmanufacturers.* FROM products LEFT OUTER JOIN productcategories ON products.ProductCategoryID = productcategories.CategoryID LEFT OUTER JOIN productmanufacturers ON products.ProductManufacturerID = productmanufacturers.ManufacturerID WHERE productcategories.Live = 1 AND productmanufacturers.Live = 1 AND productcategories.CatPermalink = ? AND products.ProductLive = 1 ORDER BY products.ProductOrder ASC");
$Categories->bindParam("s", "".$_GET["perm"] ."", "-1"); //permparam
$Categories->execute();
$Categories_Total = $Categories->TotalRows;
$Req_Pages = ceil($Categories_Total/$maxRows_Categories);
?>
Using the same page, have set up 2 new categories in the navigation 'new items' and 'clearance'
So when you go through to the new items page the RS needs to filter by new items that are based on column products.ProductDate and -30 (the CategoryID for the new items page is 17)
When you go through to the clearance page, it needs to be filtered instead by products.Clearance = 1 (the CtaegoryID for clearance is 18)
a) am not sure if these 3 can be done in one recordset
b) if multiple recordsets are needed not sure how to structure the select to accommodate the new items and clearnace
c) tried doing it and using if/else to show one rs rather than the other but just wasnt getting it right
Thanks
Jamie