select distinct from dc_coupons where approved='1' and start_date_dt<'2013-05-18 04:12:56' and ( id in (10479,10480,10481,139964,139965,139966,137816,137813,137811,137803,137802,137800,137765,137764,137762,137763,137605,137514,137513,137512,137510,137511,137508,137509,137250,137248,136912,136913,136914,144441,144438,144439,144437,144364,144344,144343,144342,144341,144331,144330,144329,144328,144323,144322,144321,144320,144319,144318,144220,144205,144204,144203,144202,144201,144200,144169,144108,144107,144106,144105,144092,144091,143997,143996,143995,135564,135563,135562,143909,143908,143907,143905,143850,143849,143808,143807,143806,143805,143804,143803,143802,143801,143800,143799,143798,143797,143796,143684,143683,143682,143634,143633,143632,143631,143630,143629,143627,143628,143626,143613,143568,143567,143566,143565,143564,143556,143555,143554,143553,143552,143394,143393,143392,143390,143391,143389,143388,143327,143325,143326,143324,143322,143323,143232,143231,143230,143228,143216,143183,143182,143181,143180,143179,143177,143178,143176,143175,143148,143147,143146,143145,143144,143143,134617,134612,134613,134614,143078,143077,143076,143075,143012,143011,143010,143009,143008,143007,143006,143005,143004,143003,143002,143001,143000,142998,142999,142996,142995,142994,142993,142992,142991,142990,142989,142964,142963,142962,142961,142960,142959,142958,142957,142956,142955,142954,142953,142952,142951,142950,142949,138457,138458,138459,134397,134398,134399,142903,142902,142901,142900,142899,142898,142825,142814,142735,142734,142733,142732,142695,142694,142692,142693,142691,142690,142689,142688,142687,142686,142620,142621,142619,142618,142525,142524,142523,142522,142520,138456,142339,142338,142337,142336,142335,142265,142263,142264,142262,142261,142260,128712,128713,128738,128739,128777,128778,128779,128780,128781,128782,128783,128829,128830,128848,128850,128851,139237,142191,142190,142189,142188,142149,142148,142124,142120,142119,142118,142117,142116,142115,142105,142104,142103,142090,142089,142088,142087,142086,129066,129067,129068,129069,138494,133335,133333,133331,133330,133309,133308,133307,133306,133305,133304,141904,141840,141839,141784,141783,134400,141626,141625,141624,141623,141622,141621,141564,141542,141541,141540,141405,141404,141403,141402,141401,141400,141399,132533,132532,132531,132530,132529,132528,141128,141127,141126,141125,141124,141123,141121,141120,141119,141118,141117,141116,141040,141039,141038,141037,132253,132252,132235,132234,132233,132231,132230,132229,132228,132227,132226,132225,132223,132222,132221,140917,140916,140842,140841,131985,140790,140791,140789,140788,140787,140769,140742,140740,140741,140739,140738,140737,140736,138845,138844,140504,140503,140478,141122,143614,141036,140786,143906,142521,143229,143685,142997,141841,144440,141115,140058,140060,140093,140156,140159,140213,140214,140215,140216,140229,140278,140318,140319,140320,140321,140322,140323,140324,140325,140326,140327,140328,140329,140330,140331,140332,140333,140334,140335,140336,140337,140350,140351,140352,140353,140354,140355,140356,140358,140359,140360,140390,140443,140444) ) 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<'2013-05-18 04:12:56' and ' at line 1