标签: sql activerecord
我无法在sql中使用IN和“AND”查询
SELECT * FROM `list` WHERE ( property_id in(1,2,3) and (admin_approve=0) )
请提供解决方案
答案 0 :(得分:0)
在sql语句中删除表名周围的Grave Accent:
SELECT * FROM list WHERE ( property_id IN( 1, 2, 3 ) AND ( admin_approve = 0 ) )