首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > perl python >

关于MySQLdb,求大神指导啊头疼

2013-01-11 
关于MySQLdb,求大神指点啊,头疼啊代码是fileLineTextfile_follower_of_original_node.readline()while(

关于MySQLdb,求大神指点啊,头疼啊
代码是
fileLineText=file_follower_of_original_node.readline()
    while(''!=fileLineText):
        temp=fileLineText
        cur=conn.cursor()
        cur.execute("select * from follower_followee where followee_id='%s'",temp)        rows=cur.fetchall()
        for row in rows:
            file_relationships_of_sample_twice.write('%s|%s\n' % (row[0],row[0]))
        cur.close() 
        fileLineText=file_follower_of_original_node.readline()
报错Mysql Error 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 '10111\n''' at line 1

如果把红色一行改为cur.execute("select * from follower_followee where followee_id=10029")则可以正常运行
这是什么情况啊?求大神指点
[解决办法]

cur.execute("select * from follower_followee where followee_id='%s'" % temp)

这样改呢?

热点排行