I need select * from new_entry where batch=2018
.
I tried query.filter(NewEntry.batch==batch).first()
i got first record in database but i need all columns which is matched to batch.What can I do?
Since you are using first() you will only get the first result, to get all the results as a list you have to use all()
query.filter(NewEntry.batch==batch).all()