I am fairly new to flask and SQLalchemy and struggling with translating a SELECT statement to a Query. I would appreciate any help.
This is the statement:
select * from product_store inner join my_store on product_store.storeid = my_store.storeid where product_store.productid = 1 and my_store.userid = 2 order by product_store.price, my_store.priority;
This is my initial attempt:
productstore = ProductStore.query.join(MyStore, ProductStore.storeid==MyStore.storeid).filter_by(ProductStore.productid==3, MyStore.userid ==2).order_by(ProductStore.price).first()
I am getting "TypeError: filter_by() takes 1 positional argument but 3 were given"