How does flask use flask_sqlalchemy to query data that does not meet the specified criteria?

for example, this statement,
results = Entity.query.filter_by (content_id=thisId,editUser=editUser). All (),
, but I want to query content_id=thisId and edit user at the same time! = "test" data, please tell me how to do it.

Mar.11,2021

filter_by replace it with filter .

results = Entity.query.filter(Entity.content_id==thisId,Entity.editUser!=editUser).all()

sql to sqlalchemy project , this is based on MYSQL, and if you pass this exercise, your sqlalchemy will fly. If you really need it, I can give you the MySQL user and password. Don't ask me who I am. I'm Lei Feng.

Menu