SELECT * FROM products pp,prod_subcat ps WHERE (`pp.productID` LIKE
'%40%' OR `productName` LIKE '%40%' OR `productDescription` LIKE '%40%'
OR `productColour` LIKE '%40%' OR `productID` LIKE '%%' OR `productName`
LIKE '%%' OR `productColour` LIKE '%%' ) AND ((ps.subcategoryID='8' AND
ps.productID=pp.productID ) OR (ps.subcategoryID='7' AND
ps.productID=pp.productID ))ORDER BY productID LIMIT 0,50
current error:
Unknown column 'products.productID' in 'where clause'
You need to sort out your backticks. Things like `pp.productID` will look for a column called pp.productID. It should be pp.`productID`. You're also only using the table alias on some of your columns. Make it clear what every single column is. And lastly, check that the column called productID actually exists in the products table.