select distinct from dc_coupons where approved='1' and start_date_dt<'2012-05-25 06:24:49' and ( id in (119394,119423,120324,120325,138132,138131,138097,138096,138095,122548,136790,136789,138695,136393,136337,136338,124183,124184,136174,136175,136172,136098,136099,136074,124771,135912,138951,135813,135812,135811,135796,135795,135794,135793,125128,138585,138586,135618,135617,135468,135467,125814,135323,135322,135321,135320,135319,138564,138565,139152,134978,134976,134977,134975,134781,134782,134780,127258,127335,127337,127338,127340,127343,139355,134567,134566,139356,134429,134428,134427,127625,127626,127627,127628,139362,139359,139361,139360,139357,127787,127788,138566,138900,138898,133800,133799,133798,133797,133710,133709,133691,133690,133572,133571,133570,133569,133568,133566,133567,133565,138520,138521,139909,139153,139358,132672,132540,139270,132538,132537,132536,132535,132392,132391,132390,138902,138903,138904,132330,138901,138899,138897,131997,131977,131903,131902,133708,131816,131815,131810,131809) ) 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 06:24:49' and ' at line 1