From 7c570f8dd3c7c645d8d275d346700f6f69802cb7 Mon Sep 17 00:00:00 2001 From: humano Date: Tue, 7 Oct 2014 06:28:54 -0500 Subject: [PATCH] Correccion bug json --- milfs/json.php | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/milfs/json.php b/milfs/json.php index cf1d118..b930eab 100644 --- a/milfs/json.php +++ b/milfs/json.php @@ -14,18 +14,23 @@ require ('funciones/convert.php'); $id_campo = $campo[0]; $link=Conectarse(); - - - - - +/* $consulta = " SELECT distinct(contenido) as data, control,form_datos.form_id as id, timestamp FROM form_datos WHERE form_datos.id_campo = '$id_campo' - AND form_id = '$id' + AND form_id = '$id' "; - -// echo $consulta; + */ + $consulta = "SELECT contenido as data , form_id as id, control, GROUP_CONCAT(id ORDER by timestamp desc ) as identificador + FROM `form_datos` + WHERE form_id = '$id' + AND id_campo ='$id_campo' $valor + group by control + ORDER BY orden desc"; + + + + //echo $consulta; mysql_query("SET NAMES 'UTF8'");