sql: SELECT SQL_CALC_FOUND_ROWS t1.*,t2.*,t3.*,t4.*,gdiv4.m_gene_div_name AS m_staff_birthplace from ( select * from t_diary where t_diary_delflag=0 and t_diray_pref_id=45 order by t_diary_regdate desc limit 3000 ) t1 inner join m_mall t2 on t1.t_diary_staff_mall_id=t2.m_mall_id left JOIN m_pref t3 ON t3.m_pref_id = t2.m_mall_pref_id left JOIN m_staff t4 ON t1.t_diary_staff_id = t4.m_staff_id LEFT JOIN m_gene_div gdiv4 ON gdiv4.m_gene_div_cd = m_staff_birthplace AND gdiv4.m_gene_div_group = 'birthplace' where 1=1 and m_staff_pc_disp = 1 m_mall_option_kb = 1 AND t1.t_diary_staff_mall_id IN (24272 , 29293 , 29450 , 29529 , 31218 , 31219 , 31220 , 31237 , 31661 , 32478 , 32792 , 33400 , 33422 , 33972 , 34421 , 34617 , 35486) ORDER BY t_diary_regdate DESC, t_diary_id DESC LIMIT 0, 5
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'm_mall_option_kb = 1 AND t1.t_diary_staff_mall_id IN (24272 , 29293 , 29450 , 2' at line 1