我有这个代码:
text = request.form.get("searchText")
print(text)
result = dbSession.execute(
"SELECT * FROM books WHERE
(isbn LIKE '%:text%') OR (title LIKE '%:text%')
OR (author LIKE '%:text%') LIMIT 10",
{ "text": text }
).fetchall()
我收到这样的错误,文字= q:
(isbn LIKE '%'q'%')
我认为必须这样翻译:
(isbn LIKE '%q%')
我该怎么办?