select distinct from dc_coupons where approved='1' and start_date_dt<'2012-05-25 04:39:17' and ( id in (114883,139680,120391,120466,139883,138309,138308,138939,138940,138272,138941,138201,138780,138781,138782,138627,138631,138632,138633,138634,138635,137994,137996,137997,137998,137985,137984,137983,139708,137910,137909,137908,137906,137907,121460,137685,137684,137683,137682,137681,137679,137680,137677,137676,137675,137673,137667,137666,137664,137665,137663,137662,137652,138504,137627,137626,138505,138506,137602,137603,137601,137600,137559,137558,137526,137525,137524,137523,137467,137466,137465,139206,139207,137275,139227,122480,122481,122482,122483,137180,137179,137139,137138,137137,137136,137116,137115,137114,139589,139588,136911,139587,139586,139585,138758,138759,138760,138761,138762,123363,136737,123462,123463,123464,123465,123469,136687,136686,136593,136594,136401,136400,136399,136398,136365,136362,136319,136318,136317,136316,136314,136315,136313,136312,136278,136275,136276,136277,124169,124170,124171,124172,124173,139528,139527,136085,136076,135945,135944,124852,124853,135847,135845,135846,135825,135826,125125,135747,135746,135745,135744,135743,135742,135741,135740,135724,135723,135722,135652,135651,135650,139275,139276,135433,135432,135431,125785,125796,125797,135383,135382,135378,135377,135261,126344,126350,135013,135012,135011,135010,135009,135008,135007,135006,138990,134721,134720,134719,134718,134717,134716,134679,134676,134677,134678,134675,134674,138642,127418,134517,134516,134468,127609,134309,134262,134263,134231,134227,134228,134229,134226,134207,134206,134205,134203,134204,134202,138943,134200,134195,134192,134193,134194,139325,138466,128412,139191,133689,133688,133687,139187,139188,139189,139192,139193,133657,133658,133659,133660,139194,139195,139196,128742,128743,128744,128745,128746,128747,139231,128941,128942,139197,139198,129093,129094,129095,129096,129097,129098,133322,133321,133320,133319,133318,139137,139136,133295,133294,133218,133156,133155,133154,133153,133152,133151,133150,133149,133148,133147,133132,133131,133130,133129,133128,133126,138707,129622,132877,132876,132875,132874,132873,139012,139011,139010,139007,139006,139008,139005,130272,130356,132401,132400,132399,132353,138643,132214,132213,139009,138878,138876,138877,138875,138874,131839,131835,131830,131828,131826,131825,131823,131822,131821,131820,131818,131817,131805,131779,131778,131777,138831,138830,138829,131702) ) 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 04:39:17' and ' at line 1