Answer the question
In order to leave comments, you need to log in
How to find Last_name by id in SQlite database?
There is a table reg_studs with columns id, first_name, last_name, group . You need to know first_name by ID . id_studs - student ID.
The code I wrote doesn't work. Where did I go wrong?
def get_name_student(id_studs):
conn = get_connection()
c = conn.cursor()
c.execute("""
SELECT reg_studs.id_studs, reg_studs.last_name
FROM reg_studs
WHERE (((reg_studs.id)= id_studs));
""")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question