select distinct from dc_coupons where approved='1' and start_date_dt<'2012-05-25 09:48:43' and ( id in (10259,10257,10258,10260,140043,140044,140045,139915,139916,139943,120393,120394,120395,120397,139884,138326,138325,138295,138294,138293,138292,138291,138245,138204,138203,138202,138115,138114,138113,138769,138080,138078,138079,138077,138076,138075,138074,138463,138023,137982,137981,121477,137873,137874,137858,137857,137856,137855,137854,137824,137823,137822,137821,137806,137805,137804,137803,137802,137801,137800,137725,137694,138638,137691,137686,137660,137657,137658,137659,137637,137636,137580,137514,137513,137512,137510,137511,137508,137509,139206,139207,138601,137359,137358,137357,137356,138768,137257,137256,122434,122435,122436,137206,137205,137204,137203,137202,139058,137134,137133,137132,137131,137130,137129,137128,137127,137126,137125,137124,137123,137024,137023,137022,137012,137011,139283,136949,136931,136930,136917,136918,136899,136896,136897,136850,139753,136795,136794,136792,136793,136760,136756,136755,136745,136744,136732,136733,136734,136731,136730,136728,136729,136697,136695,136696,138745,136694,136693,136692,136595,136596,136534,136533,136532,136454,136453,136335,136334,136332,136331,136328,136329,124166,124167,136253,136242,136221,136219,136159,136158,136157,136068,136067,136066,136061,138850,136017,136014,136015,136011,136012,136013,124772,124773,124774,124775,124803,124804,124833,124834,124835,124836,135911,135909,135908,135907,135906,135905,135894,135895,135903,135904,135853,135852,124961,124962,124963,135827,135828,138926,125102,125103,125104,125105,125106,125108,125110,135748,135718,139213,135701,139214,135700,135699,135698,135697,135678,135677,135676,135675,135674,135673,135659,135654,135655,135656,135657,135556,139319,139275,139276,135383,135382,135378,135377,135359,135358,135356,135357,135269,135261,138536,138537,138538,135190,135189,135101,135100,126331,126332,135066,135065,135053,135051,134965,134963,134962,134961,134960,126688,126689,134898,134876,138980,126894,126895,126896,126897,126913,126914,138832,134729,134728,138833,138834,138828,134715,134714,138372,134679,134676,134677,134678,134675,134622,134619,134593,134594,134595,134596,134559,134488,134489,134487,138462,133928,127622,127623,138808,134282,134281,134249,134250,134247,134246,134237,139346,139347,139176,127924,139345,139344,134072,134038,139337,134034,133931,133932,133933,133930,133929,133927,133903,133902,133901,133867,139325,128407,128409,139308,133639,133626,133627,133630,138929,138956,133515,133516,128701,128702,128703,128704,128705,128712,128713,128714,128715,128716,128717,128718,128723,128724,128725,128726,128727,139254,128848,139241,128850,128851,128941,128942,139177,129089,129090,129091,129112,129113,129114,139160,139142,139141,139139,139140,133310,134621,134620,133246,133200,133193,133192,133191,133182,133181,133180,133179,139101,139100,139099,139098,133114,129597,138746,138747,129613,138840,132870,138628,132869,132867,132866,132860,132859,132858,132857,132856,138838,138839,132855,132854,132850,132790,132789,132788,132787,138600,132743,130056,132670,132669,132664,132663,132662,132661,132660,132659,130093,132642,132624,138969,138968,132593,132592,132591,132590,132589,132588,138957,138958,138934,130272,138932,139302,139303,138931,138930,138928,138927,132414,139706,138912,138909,138910,138908,138907,132352,139787,132237,132235,132234,132233,132231,132228,132227,132226,132225,132223,132222,132221,132217,132203,132202,132083,132015,132014,130984,130985,131852,131851,131850,138847,138845,138846,138844,138843,138842,131787,131786,138841,131785,138837,138836,138835,131760,131730,131729,131728,131727,131726,131725,131724,131723,138967,131699,131689,131688,131687,131678,131677,131676,131675,131672,131671,131670,131669,131667,131668,131666,131665,131664,131663,131661,131660,139097,138811,138810,138809) ) 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:48:43' and ' at line 1