select distinct from dc_coupons where approved='1' and start_date_dt<'2012-05-25 04:32:24' and ( id in (111355,111353,10259,10257,10258,10260,2614,139917,120330,120331,120332,120333,120465,138324,138323,138206,138205,139032,137607,137606,121931,137504,137502,137500,137501,137499,137498,137497,137156,137154,137155,137153,137152,137151,137150,137149,137148,137147,137104,137103,139578,139580,139579,136705,136704,136703,136683,136682,138783,136372,136371,136370,136369,136368,136274,124161,124162,124163,136187,136188,136189,136190,135964,135963,135962,125101,125112,125114,135726,135725,139489,139488,135510,135509,125790,125791,139332,135337,135331,135330,135329,135328,135291,135288,135287,135286,135285,126327,126328,126329,126330,138832,134729,134728,138833,138834,134561,134560,134385,134369,138801,138802,134243,134244,134245,134153,134152,139346,139347,139345,139344,139336,139335,139334,139333,133864,133862,133861,133833,133834,133835,133825,133827,133828,133829,133826,133824,133823,133818,133819,133820,133822,133821,133817,133816,133815,133814,133813,133811,133812,133810,133809,133800,133799,133798,133797,138553,133532,133530,133531,133529,133528,128807,128809,128810,128811,139253,129112,129113,129114,133412,133411,133410,139251,133291,133290,139252,133199,133198,133197,133089,133085,133086,133084,133083,133082,133081,133066,133065,133064,133063,129602,129612,134368,139048,139047,138840,132870,132869,132867,132866,132860,132859,132858,132857,132856,138838,138839,132855,132854,132850,132737,132731,132730,132675,132674,132673,132668,138740,132563,132562,132561,132560,138680,138934,132432,132354,132278,132277,132276,132275,132274,132207,132206,132205,132204,132131,132130,132129,131963,131962,131961,131901,131900,138847,138845,138846,138844,131160,138843,138842,138841,138837,131781,138836,138835,131705,131704,131703,139046) ) 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:32:24' and ' at line 1