Answer the question
In order to leave comments, you need to log in
How to display variable values from BD?
There is a database, it has a table "cmd" column "num_chat", how can I display the value from this column?
(in the table not only this variable)
my bad code is:
import sqlite3
conn = sqlite3.connect("DataBasa.db")
print('DataBasa подключена!')
c = conn.cursor()
a = 0
c.execute("SELECT * FROM cmd WHERE num_chat = %d" % (a))
b = c.fetchall()
Answer the question
In order to leave comments, you need to log in
Go and learn to find all the required information in the docks https://docs.python.org/3/library/sqlite3.html
Google is also worth learning
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question