SELECT * FROM `_en_submenu` su LEFT JOIN `_en_menu` me ON (su.model_id=me.model_id AND me.gen_id=su.gen_id AND me.menu_id=su.menu_id) LEFT JOIN `_en_gen` ge ON (me.model_id=ge.model_id AND ge.gen_id=me.gen_id) LEFT JOIN `_en_model` mo ON (mo.model_id=ge.model_id) WHERE mo.mark_id=7 AND su.submenu_id=78