From 19062a773ac6436434e7539c1e43fd911f15733c Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Mon, 3 May 2004 17:42:42 +0000 Subject: [PATCH] Correcciones en la agenda. --- sistema/local_lib/Servicios/Agenda.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sistema/local_lib/Servicios/Agenda.php b/sistema/local_lib/Servicios/Agenda.php index 93edb97..9587c46 100644 --- a/sistema/local_lib/Servicios/Agenda.php +++ b/sistema/local_lib/Servicios/Agenda.php @@ -264,7 +264,8 @@ class Servicios_Agenda { edificios.cod_edificio=internos.cod_edif '; $sql.=($this->_interno) ? ' AND interno = '.$this->_interno:''; - $sql.=($this->_codep) ? ' AND internos.codep = '.$this->_codep:''; + $sql.=($this->_codep) ? ' AND internos.codep = + \''.$this->_codep.'\'':''; $sql.=($this->_edificio) ? ' AND internos.cod_edif = '.$this->_edificio:''; $sql.=($this->_piso) ? ' AND piso = '.$this->_piso:''; $sql.=($this->_oficina) ? ' AND oficina = '.$this->_oficina:''; @@ -276,14 +277,15 @@ class Servicios_Agenda { } } if ($this->_dependencia && $this->_dependencia != '--Ingrese una palabra clave--') { - $dep = split('/ /',$this->_dependencia); + $dep = split(' ', $this->_dependencia); foreach ($dep as $d) { + $d = trim($d); $sql.= " AND dependencia LIKE '%$d%'"; } } $sql.=($this->_ordenar) ? ' order by '.$this->_ordenar :''; - + $dbh = $this->_db->prepare($sql); $res = $this->_db->execute($dbh); -- 2.43.0