Hi
Im using sqlite3 for a lite project and im getting this error
Im using sqlite3 for a lite project and im getting this error
Error:conn.execute('SELECT * FROM anställda WHERE ID={0},{1},{2},{3}'.format(uid[:4]))
IndexError: tuple index out of rangei have no idea how to fix it. I think the fault lies in the formating or something. Could anyone take a look at the code and help pls. # Database stuff
#dataid = (uid[:4])
conn.execute('SELECT * FROM anställda WHERE ID={0},{1},{2},{3}'.format(uid[:4]))
data = cursor.fetchall()
#print(data)
for row in data:
version = (row[0]) #<----siffran bestämmer column
print(version)
