extra products
Hi Ray
I have a product details page which uses these recordsets to return the product info.
<?php
$PageContents = new WA_MySQLi_RS("PageContents",$DBConnection,1);
$PageContents->setQuery("SELECT productcategories.*, settings.CompanyName, settings.Town, settings.County, settings.PostCode FROM productcategories, settings WHERE CategoryID = ? OR CatPermalink = ? AND Live = 1");
$PageContents->bindParam("i", "".(isset($_GET['id'])?$_GET['id']:"") ."", "-1"); //paramOffersID
$PageContents->bindParam("s", "".(isset($_GET['perm'])?$_GET['perm']:"") ."", "-1"); //paramPermalink
$PageContents->execute();
?>
<?php
$Categories = new WA_MySQLi_RS("Categories",$DBConnection,0);
$Categories->setQuery("SELECT productcategories.CategoryName, productcategories_2.CategoryName AS parentcategoryname, productcategories.CatPermalink, productcategories_2.CatPermalink AS parentpermalink, products.* FROM productcategories INNER JOIN productcategories AS productcategories_2 ON productcategories_2.CategoryID = productcategories.CategoryParentID LEFT OUTER JOIN products ON products.ProductCategoryID = productcategories.CategoryID WHERE products.ProdPermalink = ? AND products.ProductLive = 1 ORDER BY productcategories.CategoryOrder ASC");
$Categories->bindParam("s", "".$_GET["perm"] ."", "-1"); //permparam
$Categories->execute();
?>
I'd like to add a sub row of products based on if they have the same ManufacturerID from the productmanufacturers table
how would I go about doing that please?
Cheers
Jamie