I'm trying to get data out of a sqlite database but I'm getting an error.
Code:
self.con = sqlite3.connect("config.db")
self.cur = self.con.cursor()
self.cur.execute("CREATE TABLE IF NOT EXISTS config (PCFolder TEXT, ServerFolder TEXT)")
self.con.commit()
dpop = input("Dir path on the PC->") #dpop means "dir path on pc"
dpos = input("Dir path on the server->")
self.cur.execute("INSERT INTO config VALUES (?, ?)", (dpop, dpos))
self.con.commit()
self.cur.execute("SELECT * FROM config WHERE PCFolder=?", (dpop))
name = cur.fetchall()
print(name)
Terminal
self.cur.execute("SELECT * FROM config WHERE PCFolder=?", (dpop))
sqlite3.ProgrammingError: Incorrect number of bindings supplied. The
current statement uses 1, and there are 11 supplied.