select distinct from dc_coupons where approved='1' and start_date_dt<'2012-05-25 09:40:43' and ( id in (139644,140035,140036,139972,139852,139255,138220,138197,138196,138195,138041,138040,138027,138025,138026,138024,138006,137999,138001,137946,137463,137462,137461,137460,136939,136936,136935,136934,136933,136927,136926,136925,136924,136921,136920,136919,136876,139753,139566,139565,139564,139563,136591,136598,136599,136562,136561,136559,136560,136558,136557,136556,136555,139562,139560,139561,139559,139558,139556,139553,139551,139552,139554,139555,139557,139550,139549,139547,139548,139546,139545,139544,136352,136351,136350,136349,136348,139543,136344,136343,136342,136341,136340,139542,139541,139540,136218,136217,136216,139525,139526,139524,136105,139523,139522,139521,136089,136090,136087,136086,136084,139520,139519,139518,135973,135879,135851,135716,138588,135653,138589,125660,135346,134854,134853,134852,134851,134834,134772,134771,134742,134743,134741,134740,134739,134738,134737,134736,134531,134515,134504,134498,134499,134199,134198,134197,134196,134171,134170,134169,134168,134167,134166,134163,134162,134161,134156,134155,134154,134135,134134,134096,134071,134070,131560,133859,133857,133856,133853,133851,133850,139256,128832,128833,128834,133018,133017,132642,132637,132636,132635,132634,132633,132632,132631,132630,132629,132624,133858,132203,132202,132159,132158,132157,132156,130770,130771,130772,130773,130774,130775,130776,130777,130778,130779,130780,130781,130782,132073,132024,132023,132015,132014,131993,131991,131989) ) 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 09:40:43' and ' at line 1