Marino

if you could just download the latest beta from 
http://www.pmapper.net/download.shtml and see if it works better. It 
might be that another modification was necessary that I forgot to tell.

armin

Marino Fiorito wrote:
> Hi Armin,
> 
> I have modified the line 708 inside of the query.php:
>  function q_execAttributeQuery()
> how you have suggested.
> 
> When I try to do a search, again no records result.
> 
> Inside the pm_debug there's:
> 
>  Parameters for searchParams
>  file: query.php->q_execAttributeQuery
>   Array
>  (
>      [layerName] => ptcp_ai_me_sme_a
>      [layerType] => oracle
>      [firstFld] => DEFINIZION
>      [qStr] =>   UPPER(DEFINIZION) LIKE '%FORTE%'
>  )
> 
> 
> If I use the same 'where condition' with sqlplus :
>  select * from ptcp_ai_me_sme_a where UPPER(DEFINIZION) LIKE '%FORTE%'
> the query return some records.
> 
> 
> Thanks,
> Marino
> 
>  > I guess I forgot to update the file 'query.php' after the testing on 
> Hugues' server. Try to modify line 708 to
>  >
>  > if ($this->qLayerType == "shape" || $this->qLayerType == "oracle") {
>  >
>  > and see if it works better. I will compare again both versions of 
> this file.
>  >
>  > For debugging info set debuglevel in config.ini to 3. You should get 
> a file pm_debug.log in the same directory as the PHP error log. This 
> file contains some debugging information, also about attribute search, 
> e.g. the 'qStr' should be a valid Oracle WHERE clause.
>  >
>  > armin
>  >
>  > > Hi Armin,
>  > > I have tested the the latest beta-5.
>  > > I want to search some string inside the column DEFINIZION (type 
> varchar2)
>  > > but the result is always null.
>  > >
>  > > The serch.xml contains:
>  > >
>  > >     <searchitem name="ptcp_ai_me_sme_a" description="Emergenza PTPC">
>  > >         <layer type="oracle" name="ptcp_ai_me_sme_a">
>  > >             <field type="s" name="DEFINIZION" 
> description="Emergenza PTPC"
>  > > wildcard="0" />
>  > >         </layer>
>  > >     </searchitem>
>  > > How to debug or verify the search inside the script?
>  > >
>  > > Tanks for any suggestion.
>  > >
>  > > 2007/5/11, Armin Burger <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>>:
>  > > >
>  > > > With the latest beta-5 of p.mapper 3.1 attribute search should 
> work with
>  > > > Oracle Spatial.
>  > > >
>  > > > armin
>  > > >
>  > > >
>  > > > -------- Original-Nachricht --------
>  > > > Datum: Fri, 11 May 2007 11:28:33 +0200
>  > > > Von: "Marino Fiorito" <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>>
>  > > > An: pmapper-users@lists.sourceforge.net 
> <mailto:pmapper-users@lists.sourceforge.net>
>  > > > Betreff: [pmapper-users] Fwd: R: Pmapper-users] Oracle Spatial
>  > > > Attribute        Search
>  > > >
>  > > > > hi Andreas,
>  > > > >
>  > > > > I have tried to test your solution in order to search attribute in
>  > > > oracle
>  > > > > spatial, but the query don't find anything.  Do you have modified
>  > > again
>  > > > > your
>  > > > > solution?   Do you have tested well this solution?
>  > > > >
>  > > > > Thanks for any suggestion
>  > > > >
>  > > > > P.S.:
>  > > > > My db is oracle 10g and I want to search attribute inside a varchar
>  > > > column
>  > > > >
>  > > > > >> Andreas Fachathaler
>  > > > > >> Fri, 25 Aug 2006 13:56:29 -0000
>  > > > > >>
>  > > > > >> hi!
>  > > > > >>
>  > > > > >> I added oracle spatial  attribute search to my pmapper 
> application.
>  > > > > >> If someone is interested here  is  what I did:
>  > > > > >>
>  > > > > >> I added the following lines to the file incphp/query/query.php :
>  > > > > >>
>  > > > > >> Between the if blocks near
>  > > > > >> // QUERY ON POSTGIS LAYER
>  > > > > >> and near
>  > > > > >> // QUERY ON SHAPEFILE (ETC.) LAYER
>  > > > > >>
>  > > > > >> Code:
>  > > > > >>
>  > > > > >>        } // end QUERY ON POSTGIS LAYER
>  > > > > >>
>  > > > > >>         // QUERY ON ORACLE SPATIAL (added by Andreas 
> Fachathaler)
>  > > > > >>         else if ($this->qLayerType == 8) {
>  > > > > >>
>  > > > > >>                 foreach ($getvars as $var => $val0) {
>  > > > > >>                 if ($var != "PHPSESSID" && $var != "qlayer" 
> && $var
>  > > > !=
>  > > > > >> "dbtable" && $var != "findlist" ) {
>  > > > > >>                     $fldName = preg_replace("/\#|\*/ie", "", 
> $var);
>  > > > > >>
>  > > > > >>
>  > > > > >>                     $val =
>  > > > > >> $this->q_strDecode($_GET["$var"]);
>  > > > > >>                     $sepVals = explode(' ',$val);
>  > > > > >>
>  > > > > >>                     reset($sepVals);
>  > > > > >>                     While(($val = current($sepVals)) !== 
> false) {
>  > > > > >>
>  > > > > >>                         $varValStr = returnVar($var, $val, 
> "db");
>  > > > > >>                         $nextValue = next($sepVals);
>  > > > > >>
>  > > > > >>                         // echo $varValStr . "\n";
>  > > > > >>
>  > > > > >>                         if (strlen(trim($val)) > 0) {
>  > > > > >>                              $qStr .= $varValStr;
>  > > > > >>                              //$qStr .= $varValStr ;
>  > > > > >>                              if ($nextValue) {
>  > > > > >>                                 $qStr .= " AND ";
>  > > > > >>                              }
>  > > > > >>                         }
>  > > > > >>
>  > > > > >>                     }
>  > > > > >>                 }
>  > > > > >>             }
>  > > > > >>
>  > > > > >>             //echo ("$fldName ---- $qStr");
>  > > > > >>             @$this->qLayer->queryByAttributes($fldName, $qStr,
>  > > > > >> MS_MULTIPLE);
>  > > > > >>         }
>  > > > > >>
>  > > > > >>         // QUERY ON SHAPEFILE (ETC.) LAYER
>  > > > >
>  > > >
>  

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Reply via email to