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