select distinct from dc_coupons where approved='1' and start_date_dt<'2014-11-23 16:53:23' and ( id in (5392,139944,139945,139946,139947,139948,139949,139950,139951,139952,137914,137913,144624,144625,144902,144903,137228,137225,137222,137223,137221,137220,137219,137218,137217,137216,137215,137214,137213,136842,136843,136844,136840,136841,136839,136838,136837,136836,136835,136834,136833,136832,136831,136829,136830,136828,136826,136827,136825,136824,136823,136821,136822,136820,136819,136818,136817,138417,138419,144168,144104,144103,138425,143394,143393,143392,143390,143391,143389,143388,143169,143166,143167,143168,143162,143163,143164,143165,143161,143160,142636,142635,142634,142633,142632,142631,133522,128749,138379,128765,128766,138519,141915,138493,141605,141604,141603,141602,141601,141600,141599,141598,141597,141596,141595,141593,141592,141591,141590,138430,141026,141025,141024,141023,141021,141010,141009,141008,141006,141005,141004,141003,141002,141001,141000,140999,140998,140997,138377,141594,141007,141022,140068,140069,140070,140071,140072,140073,140074,140075,140076,140077,140078,140079,140185,140186,140187,140188,140189,140190,140283,140284,140285,140286,140287,140288,140289,140290,140291,140292,140399) ) 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<'2014-11-23 16:53:23' and ' at line 1