ResSeats.query.filter_by(res_id=id).first() 

here is the code that selects the first matching line. And I need to select all matching lines by filter.

  • ResSeats.query.filter_by (res_id = id) .all () - uralbash
  • How then can I choose the desired column? if you select the res_id column like this res.res_id then it gives an error. AttributeError: 'list' object has no attribute 'res_id' - aurier
  • print (session.query (ResSeats.res_id) .filter_by (res_id = id) .all ()) or [x.res_id for x in ResSeats.query.filter_by (res_id = id) .all ()] - uralbash

0