cursor.execute("SELECT article_num1,article_num2,citation_num1,citation_num2,shortest_path_length FROM colla WHERE colla.author_name1 = '%s'",name)
结果为None
但是在数据库的命令行里运行就有结果,这是什么原因?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
这个是最找到的答案。我得到了正确结果。
提醒一下,我是用的python3.4
你是怎样获取结果的,
cursor.fetchone()execute的参数错了,第二个参数必须是一个sequence或者是dict,可以改成下面这样。