Hi Thomas, Thanks a Lot for the piece of code, it solved the problem, now i have results. Armin, I also checked the script you sent me to understand how it works.
Thaks a lot Thomas and Armin for your time. Muchas Gracias, Luis Orlando Melendez El Salvador, Centro America Thomas Raffin escribió: > Hi Luis, > > I've made few modification for querying Oracle layers but I haven't > yet finished my tests. > > Try to replace in "your-pmapper-dir/incphp/query.php", at the end of > "q_execAttributeQuery" function : > " > @$this->qLayer->queryByAttributes($fldName, $this->qStr, > MS_MULTIPLE); > " > with > " > if ($this->qLayerType == "oracle") { > @$this->qLayer->queryByAttributes(null, $this->qStr, > MS_MULTIPLE); > } else { > @$this->qLayer->queryByAttributes($fldName, > $this->qStr, MS_MULTIPLE); > } > " > I think it will solve your problem. > > Thomas > > Armin Burger a écrit : >> Luis >> >> I unfortunately have no Oracle installation available so I usually >> cannot test the functioning of it. All tests made so far with oracle >> was on a server from a user that I could access via ftp. Since 1 year >> or more I have not any more tried this and I guess the connection is >> not any more available. >> >> Why the query doesn't return any result, I don't know. The whole >> querybyattribute stuff is not one of the best parts of Mapserver and >> not always working as expected with anything else than shapefiles. >> That's the reason why I still keep the separate query for Postgis >> using PHP-Postgres functions instead of Mapscript. >> >> Please try the query with a simple, example using the script from here >> http://svn.pmapper.net/trac/browser/pmapper/trunk/utils/test_query_string.php?format=txt >> >> modify the parameters for mapfile, layer name and query string (taking >> the one from the debug log, like >> UPPER(DPTO) LIKE '%CHALATENANGO%'), ie. $mapFile, $qLayer, $qStr. If >> no result is returned then you need to ask this on the Mapserver >> mailing list. Be sure that the query executes correctly when executing >> it from a normal Oracle client. >> >> armin >> >> On Wed, May 6, 2009 at 6:22 AM, Luis Orlando Melendez >> <luisorlando.melen...@gmail.com> wrote: >> >>> Hi everyone, >>> >>> Im trying to configure search.xml file for a oracle layer and when >>> performing the search i have no results, please any idea about what i >>> m doing wrong is welcome: >>> >>> * I'm using : MS4W 2.2.8, mapserv 5.2.0 , pmapper 3.2 0 - >>> BUILD 2008-03-05, the database is oracle XE 10g >>> Im runnig all in a ruindows xp sp2 >>> >>> * >>> this is the search.xml file : >>> >>> <?xml version="1.0" ?> >>> <!--<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>--> >>> <searchlist version="1.0"> >>> >>> <dataroot>$</dataroot> >>> >>> <searchitem name="departamentos" description="departamentos"> >>> <layer type="oracle" name="departamentos"> >>> <field type="n" name="GID" description="GID" wildcard="2" /> >>> </layer> >>> </searchitem> >>> >>> >>> <searchitem name="municipios" description="Municipios"> >>> <layer type="oracle" name="municipios"> >>> <field type="s" name="LONGNAME" description="Municipios" >>> wildcard="0" /> >>> </layer> >>> </searchitem> >>> >>> <searchitem name="iglesias" description="iglesias"> >>> <layer type="oracle" name="iglesias"> >>> <field type="s" name="LONGNAME" description="iglesias" wildcard="0" /> >>> </layer> >>> </searchitem> >>> >>> >>> <searchitem name="campings" description="Camping"> >>> <layer type="oracle" name="campings"> >>> <field type="s" name="LONGNAME" description="Camping :" wildcard="0"> >>> </field> >>> </layer> >>> </searchitem> >>> </searchlist> >>> >>> >>> the layer I have configured is this: >>> >>> #========================================== DEPARTAMENTOS >>> ==================# >>> #departamentos >>> # >>> # Start of Layer Departamentos >>> # >>> LAYER >>> NAME "departamentos" >>> TYPE polygon >>> CONNECTIONTYPE oraclespatial >>> CONNECTION "mapa/m...@admin" >>> DATA "GEOMETRY FROM DEPARTAMENTOS USING UNIQUE GID" >>> DUMP TRUE >>> TEMPLATE "void" >>> STATUS ON >>> #TRANSPARENCY 70 >>> PROJECTION >>> "init=epsg:32062" >>> END >>> METADATA >>> "DESCRIPTION" "departamentos" >>> "RESULT_FIELDS" "DPTO, GID" >>> "RESULT_HEADERS" "dpto, gid" >>> "RESULT_HYPERLINK" "DPTO, GID" >>> "ows_title" "departamentos" >>> END # Metadata >>> CLASS >>> Name 'departamentos' >>> COLOR 16 181 84 >>> OUTLINECOLOR 0 0 0 >>> TEMPLATE "void" >>> END # Class >>> END # Layer >>> >>> >>> THIS IS THE PM_DEBUG.LOG i n the \incphp\xajax directory >>> >>> >>> [05-May-2009 23:04:11] P.MAPPER debug info >>> Validation of search.xml file succeeded >>> >>> [05-May-2009 23:04:37] P.MAPPER debug info >>> Searcharray in search.php->getSearchParameters() >>> Array >>> ( >>> [DPTO] => CHALATENANGO >>> [mode] => search >>> [PHPSESSID] => 5d82664df04e9a59a4c450810ad4857d >>> ) >>> >>> [05-May-2009 23:04:37] P.MAPPER debug info >>> Parameters for searchArray >>> file: query.php->q_execAttributeQuery >>> >>> Array >>> ( >>> [DPTO] => CHALATENANGO >>> [mode] => search >>> [PHPSESSID] => 5d82664df04e9a59a4c450810ad4857d >>> ) >>> >>> [05-May-2009 23:04:37] P.MAPPER debug info >>> Parameters for searchParams >>> file: query.php->q_execAttributeQuery >>> Array >>> ( >>> [layerName] => departamentos >>> [layerType] => oracle >>> [firstFld] => DPTO >>> [qStr] => UPPER(DPTO) LIKE '%CHALATENANGO%' >>> ) >>> >>> >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your >>> production scanning environment may not be a perfect world - but thanks to >>> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK >>> i700 >>> Series Scanner you'll get full speed at 300 dpi even with all image >>> processing features enabled. http://p.sf.net/sfu/kodak-com >>> _______________________________________________ >>> pmapper-users mailing list >>> pmapper-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/pmapper-users >>> >>> >> >> ------------------------------------------------------------------------------ >> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your >> production scanning environment may not be a perfect world - but thanks to >> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 >> Series Scanner you'll get full speed at 300 dpi even with all image >> processing features enabled. http://p.sf.net/sfu/kodak-com >> _______________________________________________ >> pmapper-users mailing list >> pmapper-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/pmapper-users >> >> >> >> >> >> ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ pmapper-users mailing list pmapper-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pmapper-users