[mapserver-users] layerObj.setFilter parser error

Radim Blazek radim.blazek at gmail.com
Sat Jan 14 08:47:57 EST 2012


On Thu, Jan 12, 2012 at 12:18 AM, Lime, Steve D (DNR)
<Steve.Lime at state.mn.us> wrote:
> I don't know of a simple work around. MapScript and the mapfile parser use the same expression tokenizing routine. What happens if you try single quotes? That is:
>
>   layerObj.setFilter (  '(point.id = 1)' )

Single quotes don't help.

I have discovered that the problem is key (?) word 'point',  "pokus.id
= 1" for example, and other table names work well.

As a work around I was able to use "true and (point.id = 1)".

Radim


> Steve
>
> -----Original Message-----
> From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Radim Blazek
> Sent: Tuesday, January 10, 2012 12:05 PM
> To: mapserver-users at lists.osgeo.org
> Subject: [mapserver-users] layerObj.setFilter parser error
>
> If I use layerObj.setFilter (  "(point.id = 1)" ), mapObj.OWSDispatch
> gives an error:
>
>    "msTokenizeExpression(): Expression parser error. Parsing time value failed.
>     msParseTime(): Regular expression error. Unrecognized date or
> time format ()."
>
> It works correctly with layerObj.setFilter (  "( id = 1)" ) or
> layerObj.setFilter (  "point.id = 1" ).
> FILTER "( point.id = 1 )" in mapfile also works.
> This is of course only a simple example, I need both fully qualified
> column name and parenthesis.
>
> It seems to be a bug. Do you know any simple trick, how to get it
> working for a presentation tomorrow morning?
>
> Version 6.0.1.
>
> Thanks
> Radim
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>


More information about the mapserver-users mailing list