Hello guys
I know it's probrably a difference in mySQL version (5.0.20 on testing and 4.1.20 on production), either that or just plain old bad SQL (which I'm quite good at) - (making bad SQL not just good at SQL) - but I'm interested to hear any feedback on why this is, and if it should be done a different way to be compatible with both.
My query is:
Code:
SELECT `a1`.`VI_PK` , `a2`.`name` , `b2`.`VRI_PK`
FROM `tbl_vendor_recipe` `b1`
INNER JOIN `tbl_vendor_recipe_ingredients` `b2` ON ( `b1`.`VR_PK` = `b2`.`VR_ID` )
RIGHT OUTER JOIN `tbl_vendor_product` `a1` ON ( `b2`.`VI_ID` = `a1`.`VI_PK` )
INNER JOIN `tbl_master_items` `a2` ON ( `a1`.`MI_ID` = `a2`.`MI_PK` )
WHERE (
`a1`.`V_ID` = '8'
)
AND (
`a2`.`MT_ID` = '1'
)
AND (
`b1`.`VR_PK` = '286'
)
ORDER BY `a2`.`name`
Messy with the aliases I know, but i'm not the best with SQ
-- This message may have been cut off and the rest will only be shown to members. To become a member, click here --