I have created a database in sqlite which looks like this
employeeID Name Last email Age
1 Darshan Malu darshan@example.com 24
2 Anja Schmidt anja@example.com 22
3 Neeta Rajan neeta@gmail.com 28
4 Michelle Muller m@gmail.com 32
So for enquiring by searching for ID I use this code using input as first and last name
c.execute("SELECT employeeID FROM employee WHERE first=:first AND last=:last",{"first":first,"last":last})
print('Your Employee ID is', c.fetchone())
conn.close
Which does it work.
It returns me "Your Employee ID is (1,)"
So question is
- Why is there a ',' after the ID
- How to get rid of both , and ()? so that it just prints out "Your Employee ID is 1"