Traceback (most recent call last): File "/data/www/108cun/108cun.py", line 1092, in get cur.execute("select cunid,cunname,qhname,contact,'','' from allcun where cunid in ("+ clist +") order by cunid desc limit 15") File "/usr/lib64/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute self.errorhandler(self, exc, value) File "/usr/lib64/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler raise errorclass, errorvalue ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') order by cunid desc limit 15' at line 1")