diff options
author | ramon <ramongomez@us.es> | 2012-06-26 12:22:35 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2012-06-26 12:22:35 +0000 |
commit | 735fec4e7c381f88d5b1a7f4b9d82da659282e0d (patch) | |
tree | d43766207a12a3cc1ebb880797e1b2d91d7859a7 /admin/WebConsole/includes/HTMLSELECT.php | |
parent | 19fb068f4ba78aca9b9a35fd217ced50ef1b964e (diff) |
Versión 1.0.4, #526: Eliminar duplicados de tipos de partición en formulario de propiedades de imágenes.
git-svn-id: https://opengnsys.es/svn/branches/version1.0@3244 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/WebConsole/includes/HTMLSELECT.php')
-rw-r--r-- | admin/WebConsole/includes/HTMLSELECT.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/admin/WebConsole/includes/HTMLSELECT.php b/admin/WebConsole/includes/HTMLSELECT.php index 077e7680..5db2e45b 100644 --- a/admin/WebConsole/includes/HTMLSELECT.php +++ b/admin/WebConsole/includes/HTMLSELECT.php @@ -20,6 +20,9 @@ // - clausulawhere: Clausula Where adicional // ************************************************************************************************************************************************* function HTMLSELECT($cmd,$idcentro,$nombretabla,$identificador,$nombreid,$nombreliteral,$ancho,$eventochg = "",$clase="",$clausulawhere=""){ + $nombretabla=htmlentities($nombretabla); + $nombreid=htmlentities($nombreid); + $nombreliteral=htmlentities($nombreliteral); if (!empty($eventochg)) $eventochg='onchange="'.$eventochg.'(this);"'; if (empty($clase)) $clase='formulariodatos'; $SelectHtml=""; @@ -30,7 +33,7 @@ function HTMLSELECT($cmd,$idcentro,$nombretabla,$identificador,$nombreid,$nombre $cmd->texto.=" AND (".$clausulawhere.")"; } else{ - $cmd->texto='SELECT * FROM '.$nombretabla; + $cmd->texto='SELECT DISTINCT '.$nombreid.', '.$nombreliteral.' FROM '.$nombretabla; if(!empty($clausulawhere)) $cmd->texto.=" WHERE (".$clausulawhere.")"; } @@ -49,4 +52,4 @@ function HTMLSELECT($cmd,$idcentro,$nombretabla,$identificador,$nombreid,$nombre }$SelectHtml.= '</SELECT>'; $rs->Cerrar(); return($SelectHtml); -}
\ No newline at end of file +} |