sqlite占位符的事例
作者:互联网
import sqlite3
class Demo01:
def __init__(self):
self.conn=sqlite3.connect("sql_demo_001.db")
self.cursor1=self.conn.cursor()
self.cursor1.execute("select * from table_001 where name= ? and id= ? ",('ssss',31))
print(self.cursor1.fetchall())
self.conn.commit()
self.conn.close()
d=Demo01()
标签:__,sqlite,事例,self,Demo01,占位,001,cursor1,conn 来源: https://www.cnblogs.com/kukai/p/10766388.html