select distinct from dc_coupons where approved='1' and start_date_dt<'2012-05-25 04:19:40' and ( id in (139775,139902,138334,138335,138333,138238,138237,138616,138617,138618,138619,138045,138046,138047,138043,138027,138025,138026,138024,137925,137924,139794,137743,137742,139755,137599,137598,137597,137596,137591,137590,137589,137588,137587,139774,139975,137396,137395,137394,137393,137392,137287,137286,122386,122387,139707,122434,122435,122436,137072,137073,137071,137070,136852,139575,139574,136749,136748,136747,136746,136597,136505,136504,136503,136502,139087,139088,138816,136109,136108,136105,136087,136086,136079,124803,124804,135855,135854,139792,135824,139773,135611,135610,135609,135607,135608,139114,139275,139276,139793,139772,135085,135086,135084,134972,134971,139147,134970,134968,134969,139148,134966,126879,126881,139771,134694,134695,138431,138432,134584,134583,134582,127353,139092,139777,134171,134170,134169,134168,134167,127913,139176,127924,134057,134056,134055,134054,134053,134051,134052,134050,134047,134048,134049,134045,134046,134044,133838,133836,133837,133506,133505,128922,128923,128924,128925,128926,128927,128928,128929,128930,128931,128932,139177,138434,139151,139149,139150,139118,139117,139116,129409,129410,129411,129412,129413,139115,133146,133145,133144,133143,139091,139090,139089,133045,133044,133043,132747,132743,130056,132675,132674,132673,132649,132648,132647,132646,132645,132644,132643,139758,132527,132526,132525,130272,139776,132412,132411,138914,138433,132386,132385,139757,139796,132284,132283,132282,132281,132280,132279,132278,132277,132276,132275,132274,132240,132239,139795,130736,130737,132073,132034,131976,131975,131974,131973,131955,131954,139756,139797,138581,138582,138583,138584,131766,131765,138817,138818,138814,138813) ) 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:19:40' and ' at line 1