我有以下查询:MySQL的语法错误
select irc.*,p.*,@product :='prod_product',@accessrole :='pub_accessrole'
from item_rel_coupon irc
join user_rel_coupon urc on urc.userId = 7 and irc.couponId=urc.couponId
left join if(irc.source='product',@product,@accessrole) as p on p.id=irc.itemId
但我得到一个语法错误。为什么?
MySQL给你的确切错误是什么?应该帮助查明哪一位错误 – fin1te 2011-04-19 12:01:01