Skip to content

Commit a346824

Browse files
Update routes.py
1 parent ddb4366 commit a346824

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/routes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def index():
1919

2020
elif author:
2121
cursor.execute(
22-
"SELECT * FROM books WHERE author LIKE '%" + author + "%'"
22+
"SELECT * FROM books WHERE author LIKE %s", author
2323
)
2424
books = [Book(*row) for row in cursor]
2525

0 commit comments

Comments
 (0)