- my $sql = "SELECT DISTINCT psu.isd_sistema AS sistema, pps.id_permiso AS permiso FROM samurai.perfil_sist_usuario AS psu, samurai.perm_perfil_sist AS pps WHERE psu.login = ? AND psu.id_perfil = pps.id_perfil AND psu.id_sistema = pps.id_sistema ORDER BY psu.id_sistema";
+ my $sql = "SELECT DISTINCT psu.id_sistema AS sistema, pps.id_permiso AS permiso FROM samurai.perfil_sist_usuario AS psu, samurai.perm_perfil_sist AS pps WHERE psu.login = ? AND psu.id_perfil = pps.id_perfil AND psu.id_sistema = pps.id_sistema ORDER BY psu.id_sistema";
if (!$udat{SAMURAI_Perm_vars}{observaciones}{$sistema}{$perm}) {
$udat{SAMURAI_Perm_vars}{observaciones} = '';
$sql = 'SELECT ps.observaciones AS observaciones FROM samurai.perm_sist AS ps WHERE ps.id_permiso = ? AND ps.id_sistema = ?';
if (!$udat{SAMURAI_Perm_vars}{observaciones}{$sistema}{$perm}) {
$udat{SAMURAI_Perm_vars}{observaciones} = '';
$sql = 'SELECT ps.observaciones AS observaciones FROM samurai.perm_sist AS ps WHERE ps.id_permiso = ? AND ps.id_sistema = ?';
my $dbh = DBI->connect('dbi:mysql:dbname=samurai;host=bal747f',"intranet","intranet");
$re = $dbh->prepare($sql);
$re->execute($perm, $sistema);
my $dbh = DBI->connect('dbi:mysql:dbname=samurai;host=bal747f',"intranet","intranet");
$re = $dbh->prepare($sql);
$re->execute($perm, $sistema);