- 'obtener_perfil_usuario' => 'SELECT psu.login AS login, psu.id_perfil AS id_perfil, psu.id_sistema AS id_sistema
- FROM perfil_sist_usuario AS psu
- WHERE login = ? AND id_sistema = ?
- ORDER BY id_perfil DESC',
- 'obtener_permisos_perfil' => 'SELECT e.desc_permiso AS desc_permiso
- FROM perm_perfil_sist AS pps, permiso AS e
- WHERE pps.id_perfil = ? AND pps.id_sistema = ? AND pps.id_permiso = e.id_permiso
- ORDER BY e.id_permiso DESC'
+ 'obtener_p_p_completo' => 'SELECT DISTINCT pps.id_permiso AS id_permiso
+ FROM perfil_sist_usuario AS psu , perm_perfil_sist AS pps
+ WHERE psu.id_sistema = ? AND login = ? AND psu.id_perfil = pps.id_perfil'