My SQL database has the following:


to query the lesson_id i would do : 
    lesson = LessonEntity.query.get(lesson_id)

How can i query the database to check if lesson_id exists on the same entry 
as device type and then remove..

so for example. if lesson_id matches 107 and the same entry includes 
device_type_id = 7 i want to remove this whole entry 

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/85301330-9208-4f8e-b1d4-e89ea8942239o%40googlegroups.com.

Reply via email to