With the new lines of code the search works perfectly and is sure one
solution more standard.

I have tried to activate a search also on a layer oracle (10g) with
oraclespatial type connection:
  DATA "GEOMETRY FROM SEZIONI_CENS01 USING UNIQUE ID2"

The search does not produce result and no error in the log php appears.
The search on oracle layer is also possible?

thanks Armin.

Marino


2006/10/8, Armin Burger <armin.burger a gmx.net>:
>
> if your layer/table has an entry in table 'geometry_columns' you can
> also skip completely 'using srid=26591'. This is just needed in case
> this entry is not existing, typically eg. for DB views.
>
> I don't know why 'USING UNIQUE srid=26591' doesn't produce a low level
> error of Mapserver, though, Mapserver seems to gracefully ignore it...
>
> But in general it's better to do it the clean way and modify the wrong
> parts in the code. A definition that is also working is the most complex
> one, like
>
> "the_geom from (the_geom, gid, fieldx, fieldy from mytable) as foo USING
> UNIQUE gid using srid=26591"
>
> armin
>
> Marino Fiorito wrote:
> > Sorry Armin,
> > if I have not answered fastly to your first message.
> >
> > Yes my definition DATA in the mapfile is:
> >
> >  > "the_geom from mytable USING UNIQUE gid using srid=26591"
> >
> >
> > I have changed the definition DATA with this:
> >
> > "the_geom from mytable USING UNIQUE gid USING UNIQUE srid=26591"
> >
> > and now the query search (squery.php) works correctly.
> >
> >
> > Monday I will be in office and I try to make the modification from
> > suggested you in squery.php
> >
> >  >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]);
> >
> > I want to be complimented with you for the optimal job of development of
> > the functionalities of pmapper.
> >
> > Many thanks Armin.
> >
> >
> > Armin Burger wrote:
> >
> >     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 &quot;USING&quot; 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
> >      >
> >      >
> >
> >
>
>
-------------- parte successiva --------------
Un allegato HTML ? stato rimosso...
URL: 
http://faunalia.it/pipermail/pmapper-users/attachments/20061009/2bae3b8b/attachment.htm
 

Reply via email to