select distinct from dc_coupons where approved='1' and start_date_dt<'2012-05-25 10:05:12' and ( id in (112237,10259,10257,10258,10260,139694,139693,139692,139681,139682,139683,139684,137943,137942,137873,137874,137806,137805,137804,137637,137636,137612,137580,137556,137552,137551,137548,137490,137489,122434,122435,122436,137160,137159,137079,137078,137077,137076,137024,137023,137022,139283,122966,122967,122968,122969,122970,122971,136849,136848,136847,136846,136335,136334,124166,124167,136082,136081,136071,136070,136063,136062,138850,136017,136014,136015,136011,136012,136013,124803,124804,135911,135909,135908,135907,135906,135905,135903,135904,124961,124962,124963,125102,125103,135678,135677,135676,135675,135674,135673,135556,139319,139275,139276,135269,139456,139455,139454,139453,135190,135189,139452,135066,135065,126688,126689,138980,126894,126895,138832,134729,134728,138833,138834,138828,134715,134714,138372,134622,134619,134593,134594,134595,134596,134535,134384,134383,134371,134370,127618,127619,127620,134282,134281,139346,139347,139176,127924,139345,139344,133760,133761,133762,128407,128409,139308,133677,128723,128724,128725,128726,128727,139177,129112,129113,129114,133310,134621,134620,133246,133193,133192,133191,132850,132797,132795,132796,132794,132793,132743,130056,132670,132669,132593,132592,132591,132590,132589,132588,130272,139451,132352,130597,139691,130984,130985,131852,131851,131850,131787,131786,131785,138837,138836,138835,131760,131689,131688,131687,131672) ) 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 10:05:12' and ' at line 1