1 ; ConfiguraciĆ³n de la base de datos.
4 obtener_datos_perfil = " SELECT p.id_perfil, p.desc_perfil, p.responsable FROM samurai.perfil as p "
5 obtener_datos_perfil2 = " WHERE p.id_perfil = ? "
6 obtener_datos_perfil3 = " WHERE p.desc_perfil = ?"
7 obtener_id_perfiles = " SELECT ps.id_perfil FROM samurai.perfil_sist as ps, samurai.perfil as p WHERE ps.id_perfil = p.id_perfil "
8 obtener_id_perfiles3 = " AND ps.id_sistema = ? "
9 obtener_id_perfiles2 = " AND p.desc_perfil like '%##FILTRO##%'"
10 borrar_perfil = " DELETE FROM samurai.perfil as p "
11 obtener_permisos = " SELECT id_permiso, observaciones FROM samurai.perm_perfil_sist WHERE id_perfil = ? AND id_sistema = ?"
13 borrar_permisos = " DELETE FROM samurai.perm_perfil_sist WHERE id_perfil = ? AND id_sistema = ?"
14 borrar_perfil_sist = " DELETE FROM samurai.perfil_sist WHERE id_perfil = ? AND id_sistema = ?"
15 borrar_perfil = " DELETE FROM samurai.perfil WHERE id_perfil = ?"
18 verificar_asociacion = " SELECT ps.id_perfil, ps.tipo_perfil FROM samurai.perfil_sist as ps WHERE ps.id_perfil = ? AND ps.id_sistema = ?"
19 verif_perfil_sist_usuario = "SELECT IF(0,0,count(*)) as cuenta FROM samurai.perfil_sist_usuario WHERE id_perfil = ? AND id_sistema = ? "
20 verif_perfil_sist = "SELECT IF(0,0,count(*)) as cuenta FROM samurai.perfil_sist WHERE id_perfil = ? "
22 verif_perm_perfil_sist = "SELECT id_sistema, id_perfil, id_permiso, observaciones FROM samurai.perm_perfil_sist WHERE id_sistema = ? ORDER BY id_perfil"