select distinct from dc_coupons where approved='1' and start_date_dt<'2012-05-25 05:46:02' and ( id in (112237,139643,139645,138324,138323,121141,137970,137969,121448,137853,137759,137758,137745,138639,137532,137534,137530,137529,137527,137528,137487,137486,137485,137446,137445,137444,137416,137415,137391,137390,122463,122464,137177,137176,137175,137174,137173,137172,137171,137170,137169,137156,137154,137155,137153,137152,138410,137047,122966,122967,122968,122969,122970,122971,139584,123215,136614,136613,136612,135960,135959,135958,138341,139499,135814,135810,139498,135512,135511,138339,135376,138340,139332,135337,138563,135208,135207,135206,135171,135170,135168,135003,134998,134995,134994,134993,134992,134860,134861,134862,134840,134802,134801,134800,134798,134797,134796,138971,138972,127121,134609,134610,134606,134607,134608,134599,134603,134604,134605,134598,134514,134513,134510,134511,134508,134509,127618,127619,127620,134335,134334,134333,134331,134330,134329,134328,134327,134326,134324,134325,134266,134265,134220,134221,134219,127819,127926,127927,138975,138976,139336,139335,139334,139333,133711,133714,133713,133712,139191,139192,139193,139194,139195,139196,133589,133588,133544,133543,133542,128654,128655,128659,128660,128661,128662,128663,128664,128665,128666,128667,128668,139269,139268,139267,139266,139220,139201,139200,139199,128980,128981,139197,139198,133420,133419,133415,133414,133413,133407,133406,133405,139135,139134,139133,139132,133178,133177,139053,139052,132742,132741,138978,138977,138974,138973,132586,132587,132585,132567,132566,132565,132564,132558,132557,132556,132555,132516,132515,132514,132513,132512,132511,132510,132509,132508,132410,132394,132393,138640,138412,132194,131964,131934,131933,131932,131931,131930,131929,131928,131927,131839,131835,131830,131828,131826,131825,131823,131822,131821,131820,131818,131817,138411,133585,138955) ) 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:46:02' and ' at line 1