From d5e50ec81ecc9e165b00f808888e36118b9ec0f3 Mon Sep 17 00:00:00 2001 From: Dan Shanahan Date: Mon, 21 Aug 2023 14:47:13 -0700 Subject: [PATCH] Update routes.py --- server/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/routes.py b/server/routes.py index bab7594..40b0b0d 100644 --- a/server/routes.py +++ b/server/routes.py @@ -19,7 +19,7 @@ def index(): elif author: cursor.execute( - "SELECT * FROM books WHERE author LIKE '%" + author + "%'" + "SELECT * FROM books WHERE author LIKE %s", ('%' + author + '%',) ) books = [Book(*row) for row in cursor]