; ConfiguraciĆ³n de la base de datos.
; $Id$
-obtener_datos_permiso = "SELECT id_permiso, desc_permiso, responsable FROM permiso "
-obtener_datos_permiso2 = "WHERE id_permiso = ? "
-borrar_permiso = "DELETE FROM permiso "
-verificar_asociaciones1 = "SELECT IF(0,0,count(*)) as cuenta FROM perm_sist "
-verificar_asociaciones2 = "SELECT IF(0,0,count(*)) as cuenta FROM perm_perfil_sist "
+
+
+obtener_datos_permiso = "SELECT p.id_permiso, p.desc_permiso, p.responsable FROM samurai.permiso as p "
+obtener_datos_permiso2 = "WHERE p.id_permiso = ? "
+obtener_datos_permiso5 = " ORDER BY p.desc_permiso "
+obtener_datos_permiso3 = ",samurai.perm_sist as ps WHERE ps.id_sistema = ? AND ps.id_permiso = p.id_permiso "
+obtener_datos_permiso4 = ",samurai.perm_sist as ps WHERE ps.id_permiso = p.id_permiso "
+borrar_permiso = "DELETE FROM samurai.permiso WHERE id_permiso = ?"
+verificar_asociaciones1 = "SELECT IF(0,0,count(*)) as cuenta FROM samurai.perm_sist as p "
+verificar_asociaciones2 = "SELECT IF(0,0,count(*)) as cuenta FROM samurai.perm_perfil_sist as p "
+