select statement
Hey Ray
Am trying to get a RS setup that shows results firstly if productcategories Live = 1 and then show each item so long as productmanufacturers Live = 1
I have got this where the productcategories element is working but not the manufacturers side of things
<?php
$Categories = new WA_MySQLi_RS("Categories",$DBConnection,0);
$Categories->setQuery("SELECT productcategories.*, products.*, productmanufacturers.* FROM products LEFT OUTER JOIN productcategories ON products.ProductCategoryID = productcategories.CategoryID LEFT OUTER JOIN productmanufacturers ON products.ProductCategoryID = 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();
?>
Not sure how to get the manufacturers side of things set correctly.
Many thanks
Jamie