+
+sistemas_seleccionar = "SELECT DISTINCT psu.id_sistema AS id_sistema,s.nombre_sistema AS nombre_sistema FROM samurai.perfil_sist_usuario AS psu, samurai.sistema AS s, samurai.perm_perfil_sist AS pps WHERE psu.id_sistema = s.id_sistema AND psu.id_sistema = pps.id_sistema AND psu.id_perfil = pps.id_perfil AND s.estado = 1 AND psu.login = ? AND pps.id_permiso IN (?,?,?,?,?,?) ORDER BY s.nombre_sistema"
+sistemas_seleccionar2 = "SELECT count(psu.id_sistema) AS cuenta FROM samurai.perfil_sist_usuario AS psu, samurai.perm_perfil_sist AS pps WHERE psu.id_sistema = ? AND login = ? AND psu.id_perfil = pps.id_perfil AND psu.id_sistema = pps.id_sistema AND pps.id_permiso = ?"
+
+;BORRAR ASOCIACIONES
+ea_obt_idperfil = "SELECT id_perfil FROM samurai.perm_perfil_sist WHERE id_permiso = ? AND observaciones = ? AND id_sistema = ?"
+ea_del_perm_perfil_sist = "DELETE FROM samurai.perm_perfil_sist WHERE id_permiso = ? AND observaciones = ? AND id_sistema = ?"
+ea_obt_cuenta_perfil = "SELECT IF(0,0,count(*)) as cuenta FROM samurai.perm_perfil_sist WHERE id_perfil = ? AND id_sistema = ?"
+ea_obt_cuenta_perfil_sist = "SELECT IF(0,0,count(*)) as cuenta FROM samurai.perfil_sist WHERE id_perfil = ?"
+ea_del_perfil_sist = "DELETE FROM samurai.perfil_sist WHERE id_perfil = ? AND id_sistema = ?"
+ea_del_perfil_sist_usuario = "DELETE FROM samurai.perfil_sist_usuario WHERE id_perfil = ? AND id_sistema = ?"
+ea_del_perfil = "DELETE FROM samurai.perfil WHERE id_perfil = ?"
+