select distinct from dc_coupons where approved='1' and start_date_dt<'2012-05-25 08:43:31' and ( id in (139688,139689,139690,139685,139686,139687,140037,140038,140039,140040,140041,140042,139955,139956,139957,139960,120346,120347,120348,120349,120350,139885,138322,138321,138307,138208,138207,137938,137757,137756,137755,137754,137753,137752,137751,137566,137565,137564,137540,137535,137536,137537,137538,137539,137201,137200,137199,137198,137197,122548,123216,136781,136618,136617,136570,136585,136586,136587,136588,136589,136590,136536,138692,138693,138695,136447,136438,136437,136367,136074,136068,136067,136066,136058,136057,136056,136055,136054,136053,136021,136010,138342,138343,124833,124834,124835,124836,135813,135812,135811,139494,139493,139492,139491,139490,135720,135721,135719,135392,135391,135390,135389,135388,135387,135386,135385,125798,125799,125800,125801,125802,135384,135319,135267,138529,138530,138531,135188,135186,135187,135034,135033,135032,135031,135030,135029,134863,134866,134874,134744,134687,134688,134689,127150,134673,134672,134670,138528,134426,134310,134082,134083,134081,133995,133996,133997,133924,133922,133923,139324,133691,133690,128677,128678,128681,128682,128683,128684,128685,128686,128687,128690,128695,128696,128698,128699,138522,138525,138526,138527,129053,129055,129056,129057,129058,129074,129075,129076,129077,129078,129079,129080,129081,129082,133403,133402,132656,132655,132654,132653,132652,132625,138685,138686,132425,132424,132423,132422,132421,132420,132419,132418,132417,132416,130617,132187,132185,132184,132183,132182,132181,132180,132179,132063,132062,138577,131899,138578,131898,131894,131892,138579,131890,131888,131887,131886,131885,131884,131883,138580,131733) ) 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 08:43:31' and ' at line 1