Jun-16-2020, 05:33 AM
Hey guys I figured it out. My code works. However, I have another question that I posted if you can take a look at it. Here's the fixed code:
@app.route("/search", methods=["GET", "POST"]) def search(): search = request.form.get("search") search1 = search + '%' b = db.execute("SELECT * FROM books WHERE author LIKE :search OR isbn LIKE :search OR title LIKE :search LIMIT 10", {'search': search1}).fetchall() print(b) return render_template("search.html")