I guess your DATA definition is of type
"the_geom from mytable USING UNIQUE gid using srid=26591"
try to substitute in squery.php the line ~716
$data_list['unique_field'] = trim($tabl[1]);
with
$unique_list = preg_split('/[\s]+/', trim($tabl[1]));
$data_list['unique_field'] = trim($unique_list[0]);
For me this solves the problem.
armin
Marino Fiorito wrote:
> Hi,
>
> I'm trying a postgis layer in pmapper with administrative boundaries.
> The visualization of map it's ok but the query on the column of a layer
> is not performed and the query returned the following php error:
>
> [04-Oct-2006 10:40:15] PHP Warning: pg_query() [<a
> href='function.pg-query'>function.pg-query</a>]: Query failed: ERROR:
> syntax error at or near "USING" at character 12 in
> ..\apps\pmapper\incphp\query\squery.php on line 603
> [04-Oct-2006 10:40:15] P.MAPPER: PG Query error for : SELECT gid USING
> SRID=26591,
> xmin(box3d(ogc_geom)),
> ymin(box3d(ogc_geom)),
> xmax(box3d(ogc_geom)),
> ymax(box3d(ogc_geom)),
> cod_prov,cod_com,nome_comune
> FROM comuni_5000
> WHERE nome_comune ~* 'ROMA'
> LIMIT 301
> [04-Oct-2006 10:40:15] PHP Warning: pg_numrows(): supplied argument is
> not a valid PostgreSQL result resource in
> ..\apps\pmapper\incphp\query\squery.php on line 607
>
> inside the js_config.php the settings of Postgis layer are:
> searchList['comuni_5000'] = new Array('<?php echo _p("comune") ?>',
> '#nome_comune', '<?php echo _p("nome comune") ?>','');
>
> I think the problem is in the where condition:
> WHERE nome_comune ~* 'ROMA'
>
> why squery.php formatted the query like this?
>
> have you got any idea about where is my mistake..?
>
> thanks. marino
>
>