Mejoras en paginacion de api simple

This commit is contained in:
fredyrivera 2017-10-18 16:58:33 -05:00
parent f4fe785c73
commit f42937a10a
2 changed files with 10 additions and 4 deletions

View File

@ -9,13 +9,19 @@ require ('funciones/convert.php');
require ("includes/markdown.php");
require ("funciones/conex.php");
$datos['id']=$_REQUEST['id'];
$datos['identificador']=$_REQUEST['identificador'];
$datos['dato']=$_REQUEST['dato'];
if(isset($_REQUEST['identificador'])) {$datos['identificador']=$_REQUEST['identificador'];}
if(isset($_REQUEST['dato'])) {$datos['dato']=$_REQUEST['dato'];}
if(isset($_REQUEST['inicio'])) {$datos['inicio']=$_REQUEST['inicio'];}
if(isset($_REQUEST['start'])) {$datos['start']=$_REQUEST['start'];}
if(isset($_REQUEST['fin'])) {$datos['fin']=$_REQUEST['fin'];}
if(isset($_REQUEST['end'])) {$datos['end']=$_REQUEST['end'];}
if(isset($_REQUEST['tipo'])) {$datos['tipo']=$_REQUEST['tipo'];}
/*$datos['dato']=$_REQUEST['dato'];
$datos['inicio']=$_REQUEST['inicio'];
$datos['start']=$_REQUEST['start'];
$datos['fin']=$_REQUEST['fin'];
$datos['end']=$_REQUEST['end'];
$datos['tipo']=$_REQUEST['tipo'];
$datos['tipo']=$_REQUEST['tipo'];*/
if(isset($_REQUEST['debug'])) {ini_set('display_errors', 'On');
}
header('Content-Type: application/json');

View File

@ -5013,7 +5013,7 @@ if($timestamp != "") {
// $array["consulta"] = "$consulta";
// return $timestam;
}else{
$consulta ="SELECT * FROM form_datos WHERE control = '$identificador' $w $w_timestamp
$consulta ="SELECT * FROM form_datos WHERE control = '$identificador' $w
GROUP BY timestamp,id_campo ORDER BY timestamp DESC ";
}