Give the query:
SELECT
tblProducts.ID, tblProducts.views, tblProducts.productName, tblProducts.isForSale, tblProducts.isLimitedStock, tblProducts.stockCount, tblProducts.description, tblProducts.weightKG, tblProducts.basePrice, tblProducts.dateCreated, tblProductCats.catName,
(SELECT COUNT(*) FROM tblProductPrices WHERE productId = tblproducts.id) AS priceMods,
(SELECT COUNT(*) FROM tblcomments WHERE productId = tblproducts.ID) AS comments,
(SELECT COUNT(*) FROM tblProductImages WHERE productID = tblproducts.id) AS imageCount
FROM
tblProducts
INNER JOIN
tblProductCats ON tblProducts.categoryID = tblProductCats.ID
If the category ID for the product is 0 (tblProducts INNER JOIN tblProductCats ON tblProducts.categoryID = tblProductCats.ID)
it will not return the product record, is there anyway to modify the query so it does return records with 0 as a value and shows the category name as 'Orphan'?