I have just taken a look at this issue. You say that if the LEFT OUTER JOIN is removed, you are able to run the query without any issue. We can try a RIGHT OUTER JOIN instead like this:
$query_ExistingProducts = sprintf("SELECT DISTINCT ps3_products.ProductID, COALESCE(ps3_productoptions.GroupingID,ps3_product s.ProductID) AS GroupingID FROM ps3_productoptions RIGHT OUTER JOIN ps3_products ON ps3_productoptions.ProductID = ps3_products.ProductID WHERE ps3_products.ProductID = %s or ps3_productoptions.GroupingID = (SELECT GroupingID FROM ps3_productoptions WHERE ProductID = %s LIMIT 1 )", GetSQLValueString($PIDParam_ExistingProducts, "int"),GetSQLValueString($PIDParam_ExistingProduct s, "int"));
There shouldn't be an issue with performing a left join on two tables, but since its causing an issue, if you try a right join this might work better.


