OK Armin, adding the "USING UNIQUE <field>" to the PostGIS layer declaration the problem is solved
Thanks 2007/7/26, Armin Burger <[EMAIL PROTECTED]>: > > you get an error: > > ERROR: column "oid" does not exist at > > you need to define a UNIQUE field for identifying records in the table. > If no one is defined then p.mapper tries to use the OID field. This > field is not created any more by default since newer Postgres versions. > So you need a unique field and define it like described here > > http://svn.pmapper.net/trac/wiki/FaqConfiguration#PostGIStables > > It's never bad to have first a look at the available docs, anyway. > > If this does not sort out the problem then try to dig deeper into it > analyzing the error logs of PHP and the debug loggings of pmapper (I > will update the docs with regard to the debug settings). > > armin > > > luis alfios wrote: > > Hi everyone > > > > First of all, I am testing pmapper with version "p.mapper 3.1 > > beta4 (Mar 8, 2007)" available in > > http://maptools.org/ms4w/index.phtml?page=downloads.html. > > > > The problem is the search function. When I search in a postgis layer > > this function goes wrong, however this same layer, converted to shape, > > is searched correctly by pmapper. This is the javascript error that > > returns the search in the postgis layer: > > > > Error: invalid flag after regular expression > > Source file: http://prueba1/pmapper/javascript/xmlhttp.js > > Line: 93, column: 11 > > Source code: <b>Warning</b>: pg_query() > > [<a href='function.pg-query'>function.pg-query</a>]: > > Query failed: ERROR: column "oid" does not exist at > > character 8 in > > <b>C:\ms4w\apps\pmapper-3.1-beta4\incphp\query\squery.php</b> on line > > <b>666</b><br /> > > > > I have followed the steps in > > http://svn.pmapper.net/trac/wiki/UpgradeInfo to define attribute search > > via /config/.../search.xml, but it seems dont take effect for postgis > > layers. > > > > I also have tried to download the stable version of pmapper from > > http://www.pmapper.net/download.shtml to try the search function in > > a postgis layer in this version, however this stable version seems > > to be wrong configurated, the demo map is not loading correctly ... > > > > Anyone can tell me something about this topics? > > > > Thanks in advance > > > > > > > > > > This is one of my postgis layers in the .map file and my search.xml: > > > > LAYER > > NAME 'casas_rurales' > > ### Defined like a postgis layer > > CONNECTIONTYPE postgis > > CONNECTION "user=<my_user> password=<my_passw> dbname=gis > host=prueba1 > > port=5432" > > DATA "the_geom FROM public.casas_rurales" > > #### Defined like a shape layer > > ####DATA "C:\ms4w\apps\pmapper- > > 3.1-beta4\config\alojamientos\casas_rurales" > > TYPE point > > STATUS ON > > TOLERANCE 10 > > TOLERANCEUNITS PIXELS > > > > METADATA > > "DESCRIPCION" "casas_rurales" > > "RESULT_FIELDS" "nombre,desmun,direccion" > > "RESULT_HEADERS" "Nombre,Municipio,Direccion" > > END # Metadata > > > > CLASSITEM "gid" > > > > CLASS > > NAME 'casa_rurales' > > MINSCALE 5000 > > MAXSCALE 250000 > > TEMPLATE void > > STYLE > > SYMBOL 'icono_casas rurales' > > COLOR 0 0 0 > > OUTLINECOLOR 0 0 0 > > END > > END > > > > END > > > > SYMBOL > > NAME 'icono_casas rurales' > > TYPE pixmap > > IMAGE 'C:\ms4w\apps\callejero\iconos\ico_casas_rurales.gif' > > END > > > > > > > > > > ############ the search.xml > > <?xml version='1.0'?> > > <!-- <?xml-stylesheet href="style.xsl" type="text/xsl" ?> --> > > > > <searchlist version="1.0"> > > > > <dataroot></dataroot> > > > > <searchitem name="casas_rurales" description="Casas Rurales"> > > <layer type="postgis" name="casas_rurales"> > > <field type="s" name="nombre" description="Casa:" wildcard="0" /> > > </layer> > > </searchitem> > > > > <searchitem name="Comarcas" description="Comarcas"> > > <layer type="shape" name="Comarcas"> > > <field type="s" name="comarcas" description="Comarca:" > wildcard="0" /> > > </layer> > > </searchitem> > > > > </searchlist> > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > pmapper-users mailing list > > pmapper-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/pmapper-users > > > ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ pmapper-users mailing list pmapper-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pmapper-users