擅长:python、mysql、java
<p>谢谢大家我能解决我的问题我运行了这个查询</p>
<pre><code> res =request.form.get('search')
#likeString = "'%%"+res+"%%'"
if res!="":
#return(res)
results=db.execute("SELECT * FROM books WHERE (LOWER(isbn) LIKE LOWER(:res)) OR (LOWER(title) LIKE LOWER(:res)) OR (author LIKE LOWER(:res)) LIMIT 10",
{ "res": '%' + res + '%'} ).fetchall()
</code></pre>
<p>它对我有魔力!在</p>