Ver Mensaje Individual
  #15 (permalink)  
Antiguo 21/09/2011, 06:01
emeotero
 
Fecha de Ingreso: mayo-2011
Ubicación: Santiago de Compostela
Mensajes: 126
Antigüedad: 13 años
Puntos: 0
Respuesta: php y javascript forms

me faltaba la comilla en el primer txt+= "'"+probachooser.options[i].value+"'";
si ejecuto la consulta la primera vez no me pone la comilla aunque sigue fallando
POST:
date1=20110901&date2=20110908&especies='AKJ'#'AKL' #'14'
RESP:
select id_haul, id_catch, shooting_time ST_AsGeoJSON(geom, 4) AS geojson from "haul" natural inner join catch where a_code in ('AKJ','AKL','14') and shooting_time between '-infinity' and 'now'
Warning: pg_query(): Query failed: ERROR: syntax error at or near "(" at character 53 in /var/www/html/faros/Geo/consulta2.php on line 24
Query failed: ERROR: syntax error at or near "(" at character 53

pero las sucesivas veces q ejecuto la consulta si me pone la coma delante de la primera especie ¿?¿?
POST:
date1=20110901&date2=20110903&especies=#'16'#'ALC' #'PHO'#'SWX'#'OUM'#'OUW'
RESP:
select id_haul, id_catch, shooting_time ST_AsGeoJSON(geom, 4) AS geojson from "haul" natural inner join catch where a_code in (,'16','ALC','PHO','SWX','OUM','OUW') and shooting_time between '-infinity' and 'now'
Warning: pg_query(): Query failed: ERROR: syntax error at or near "(" at character 53 in /var/www/html/faros/Geo/consulta2.php on line 24
Query failed: ERROR: syntax error at or near "(" at character 53