select distinct from dc_coupons where approved='1' and start_date_dt<'2012-05-25 04:04:26' and ( id in (111455,7838,7837,139878,139877,121469,121471,121472,121482,121483,121484,121486,137353,137350,137348,137284,137281,137280,137279,137278,139228,137156,137154,137155,137153,137152,137113,137112,137111,123215,139911,124550,124551,139509,139510,138916,135772,135771,135770,135769,139910,138590,134414,135293,135294,135292,138532,138533,138534,138535,135175,135174,135173,134840,127197,127199,127261,127264,139093,138454,134419,134411,134412,134413,134409,134410,134408,134407,134406,127819,139508,134114,134113,127936,127937,127938,127939,127940,127941,139507,134106,134104,134105,134102,133833,133834,133835,128306,133675,133673,133674,133670,133671,133672,133669,133668,133589,133588,128818,128820,128821,139229,133434,133430,133429,133428,133427,133425,133426,129310,134415,133062,133061,133060,139060,139059,132879,132878,132777,132776,132775,130110,130111,132567,132566,132565,132564,131941,131940,131939,131938,131937,138370,133676,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 04:04:26' and ' at line 1