Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

db.execute() returning KeyError when using one keyword argument twice #159

Closed
Raghav1999 opened this issue Jul 28, 2021 · 1 comment
Closed

Comments

@Raghav1999
Copy link

below is the example of SQL query which produces KeyError:
db.execute("SELECT col1,col2 FROM table WHERE col3=:email AND col4=:email AND col5=:dob", email=email, dob=dob)

Here, the same keyword argument :email is used twice in the query but it raises KeyError in cs50 7.0.1 but it was working fine previously.

Using '?' positional arguments works fine.

OutputAfterSQL_Query

@kzidane
Copy link
Member

kzidane commented Jul 28, 2021

Good catch! Should be fixed in 7.0.2. Thank you.

@kzidane kzidane closed this as completed Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants