flask怎么調用sqlite?
使用 g.db = sqlite3.connect(database) cur = g.db.execute('SELECT * from BOOKS') Recipes = [dict(ID=row[0], TYPE=row[1], CONTENT=row[2]) for row in cur.fetchall()] g.db.close() return render_template("index.html",ID=ID) database 使用絕對路徑
flask怎么調用sqlite?
使用 g.db = sqlite3.connect(database) cur = g.db.execute('SELECT * from BOOKS') Recipes = [dict(ID=row[0], TYPE=row[1], CONTENT=row[2]) for row in cur.fetchall()] g.db.close() return render_template("index.html",ID=ID) database 使用絕對路徑