From 0aea50ef2e8abb93f1b984b18a2b61c9fed562c8 Mon Sep 17 00:00:00 2001 From: humano Date: Tue, 30 Sep 2014 17:28:50 -0500 Subject: [PATCH] =?UTF-8?q?Mejora=20en=20la=20presentaci=C3=B3n=20de=20con?= =?UTF-8?q?sulta=20de=20datos.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- milfs/funciones/funciones.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/milfs/funciones/funciones.php b/milfs/funciones/funciones.php index dc084c7..364f2c3 100644 --- a/milfs/funciones/funciones.php +++ b/milfs/funciones/funciones.php @@ -1886,13 +1886,13 @@ if (preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-z function formulario_valor_campo($perfil,$id_campo,$valor,$id_control){ -if($id_control !=""){ $control ="AND `control` = '$id_control'";}else {$control ="";} +//if($id_control !=""){ $control ="AND `control` = '$id_control'";}else {$control ="";} $link=Conectarse(); mysql_query("SET NAMES 'utf8'"); $valor=mysql_real_escape_string($valor); if($valor !=""){ $valor ="AND md5(contenido) LIKE '$valor'";}else {$valor ="";} -$consulta = "SELECT * FROM `form_datos` WHERE `form_id` = '$perfil' AND id_campo='$id_campo' $valor $control ORDER BY timestamp DESC LIMIT 1"; +$consulta = "SELECT * FROM `form_datos` WHERE `form_id` = '$perfil' AND id_campo='$id_campo' $valor AND `control` = '$id_control' ORDER BY timestamp DESC LIMIT 1"; $sql =mysql_query($consulta,$link); $cant =mysql_num_rows($sql);