📜  在 python 代码示例中使用字符串作为参数的 sqlite 查询

📅  最后修改于: 2022-03-11 14:46:00.047000             🧑  作者: Mango

代码示例1
import sqlite3

conector = sqlite3.connect("database.db")
cursor = conector.cursor()
string = "Some interesting stuff"
cursor.execute("SELECT * FROM table WHERE item = ?", [string])