zakari1231 / project1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SQLAlchemy query error

cbedroid opened this issue · comments

project1/app.py

Line 184 in ca027e9

results = Books.query(Books.title==search).all()

Your query function is not right. You are missing filter function at the end of your query function.

results = Books.query(Books.title==search).all() 

#It should be like this instead

results = Books.query.filter(Books.title==search).all()  # this should fix your problem.