我在批量导出时,出现错误

2016-07-07 15:47 来源:www.chinab4c.com 作者:ecshop专家

MySQL server error report:Array ( [0] => Array ( [message] => MySQL Query Error ) [1] => Array ( [sql] => SELECT g.*, b.brand_name as brandname FROM `kqdeco0_kq`.`kqgoods` AS g LEFT JOIN `kqdeco0_kq`.`kqbrand` AS b ON g.brand_id = b.brand_id WHERE is_delete = 0 AND g.cat_id IN ('11') AND brand_id = '14' ) [2] => Array ( [error] => Column 'brand_id' in where clause is ambiguous ) [3] => Array ( [errno] => 1052 ) )

回答:
SQL语句有错
最后部分的
AND g.cat_id IN ('11') AND brand_id = '14'
中的brand_id未指明属于哪个表。

谢谢你的解答,请问我要修改什么地方可以修复这个错误呢,,谢谢,,

谢谢你的解答,请问我要修改什么地方可以修复这个错误呢,,谢谢,,