select distinct from dc_coupons where approved='1' and start_date_dt<'2012-05-25 05:09:15' and ( id in (138140,121459,121482,121483,121484,121486,139125,123454,123455,136256,135457,135458,134895,139122,139123,134893,134892,134891,139124,134886,134887,134630,134629,134628,134626,134345,134344,134343,134342,134340,134341,134339,134337,134338,127936,127937,127938,127939,127940,127941,133730,133729,133728,133727,139131,139129,139130,139128,139127,139126,134627,138706,139060,139059,130110,130111,131337) ) order by creation_date_dt desc limit 0, 10 |1064: 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 'from dc_coupons where approved='1' and start_date_dt<'2012-05-25 05:09:15' and ' at line 1