searching values contains / charcter

Barış G öral baris at CSCRS.ITU.EDU.TR
Fri Feb 24 05:34:29 PST 2006


hi Puneet,

  im using PHP/MapScript

  using a code like

  $this->qLayer->queryByAttributes($fldName, "('[STEPNUM]' =~ /123/)",
MS_MULTIPLE);

  the query returns result,

  $this->qLayer->queryByAttributes($fldName, "('[STEPNUM]' =~ /123/12/)",
MS_MULTIPLE);


  the query returns 0, but there are values like 123/123 or 123/12.

best regards.


Quoting Puneet Kishor <punkish at eidesis.org>:

> Barış Göral wrote:
>> Hello all,
>>
>>   I'am familiar with regExp, but new with the MapServer. I just want 
>> to search a
>> string like '123/1'.
>>
>>   i tried,
>>
>>   qString = "/123\/1/";
>>   qString = "/123/1/";
>>
>> But the result is 0. I don't know if there is a way to define / 
>> character with
>> regExp to make query string being understood.
>>
>
>
> could you give more context please? Are you using CGI, or MapScript? 
> If the latter, which kind of MapScript (PHP, Python, Perl, etc.)? 
> Providing the actual bit of code that is giving you trouble would be 
> very helpful as well.
>
> --
> Puneet Kishor
>



More information about the MapServer-users mailing list