I'm developing a CRUD graphic interface.
def crudRead():
myConex=sqlite3.connect("Users")
myCursor=myConex.cursor()
myCursor.execute("SELECT*FROM USER_DATA WHERE ID="+id_number.get())
theUser=myCursor.fetchall()
for user in theUser:
id_number.set(usuario[0])
username.set(usuario[1])
password.set(usuario[2])
biographyText.insert(1.0, usuario[3])
myConex.commit()
Error: myCursor.execute("SELECT*FROM USER_DATA WHERE ID="+id_number.get())
TypeError: can only concatenate str (not "int") to str
How can i do it to search by the id without having that error? I've tryed to set id_number.get() and it doesn't return any error but the program doesn't work properly because ID column in database have integer values.