Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python和SQlite_Python_Sqlite - Fatal编程技术网

Python和SQlite

Python和SQlite,python,sqlite,Python,Sqlite,我试图保存游标_1的值, 但我做不到 cursor_1 = conn.execute("SELECT cost from test where name like 'fish'") for row in cursor_1: print "cost = ", row[0] 我想保存每个“游标\u 1”值 data = conn.execute("SELECT cost from test where name like 'fish'").fetchall() 此外,无论您在做什么,都不需要

我试图保存游标_1的值, 但我做不到

cursor_1 = conn.execute("SELECT cost from test where name like 'fish'")
for row in cursor_1:
  print "cost = ", row[0]
我想保存每个“游标\u 1”值

data = conn.execute("SELECT cost from test where name like 'fish'").fetchall()
此外,无论您在做什么,都不需要使用光标