select distinct from dc_coupons where approved='1' and start_date_dt<'2012-05-25 10:12:24' and ( id in (5392,139944,139945,139946,139947,139948,139949,139950,139951,139952,139953,139954,137914,137913,121482,121483,121484,121486,138471,138472,138473,138474,137228,137225,137222,137223,137224,137221,137220,137219,137218,137217,137216,137215,137214,138470,137213,139078,136842,136843,136844,136840,136841,136839,136838,136837,136836,136835,136834,136833,136832,136831,136829,136830,136828,136826,136827,136825,136824,136823,136821,136822,136820,136819,136818,136817,138660,138661,136722,136720,136719,136717,136718,136691,136690,138417,138418,138419,138420,138699,136554,136552,136550,136549,138698,136548,136547,136546,138700,138701,138696,138697,138997,136149,136148,136147,136142,136143,136144,138662,139275,139276,138659,138658,139450,139449,126203,138425,134943,134942,134941,134939,138428,134574,139065,127936,127937,127938,127939,127940,127941,138963,138480,138426,138427,138424,133522,128749,128758,138379,128764,128765,128766,138421,138422,138423,138519,139250,138487,138486,138485,138484,138483,138482,138481,133285,133278,133276,133275,133272,133271,138702,138703,138704,138705,138492,138493,139079,139069,139068,139066,139067,139062,139063,139064,139060,139059,138429,138491,138490,138488,138489,132987,132984,132982,132981,132980,132979,132978,132977,132976,132975,132973,132974,139003,139001,139002,139000,138378,138999,138998,130110,130111,138962,132552,138961,138938,138937,138936,130272,138430,132413,138475,138476,138477,138377,138478,138479,138668,138667,138663,138664,138665,138666,131796,131795,131792) ) 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 10:12:24' and ' at line 1