Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @app.route("/bd")
- def my_db():
- l = []
- with sq.connect("dota.bd") as con:
- cur = con.cursor()
- cur.execute("""CREATE TABLE IF NOT EXISTS users (user_id INTEGER PRIMARY KEY AUTOINCREMENT,name TEXT NOT NULL)""")
- for row in cur.execute("SELECT name FROM users;"):
- l.append(*row)
- link = ""
- for x in my_db():
- link += f"<a href='/{x}'>{x}</a><br>"
- return l
Advertisement
Add Comment
Please, Sign In to add comment