select distinct from dc_coupons where approved='1' and start_date_dt<'2012-05-25 09:46:47' and ( id in (107297,139665,139992,139994,120466,138791,137986,139208,139209,137007,136998,136860,136861,123469,136389,136383,138789,138790,124161,124162,124163,124189,125102,125103,135405,135401,135399,135397,135398,135396,135395,135394,125798,125799,125800,125801,125802,135267,135235,135237,135238,135239,135240,135241,135242,135234,135210,135209,134128,134126,134127,134125,128829,128830,139168,139165,139210,139172,139173,139174,139175,139171,139170,139169,139167,139166,139164,139163,139162,138495,138496,133338,133336,138707,138498,138497,138792,138793,132825,132690,132689,132688,138989,138986,138987,138988,138984,138985,131612,131611,131610) ) 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:46:47' and ' at line 1