Problem with queryByAttributes

Yewondwossen Assefa assefa at DMSOLUTIONS.CA
Thu Feb 8 12:21:26 EST 2007


I had seen a similar problem recently with mapserver 4.10.0 but It 
worked ok with mapserver cvs. I could not loacate quickly what the fix 
was. If you have the ability to try mapserver from cvs, It could solve 
your problems. Hope it helps.

Later,


Dirk Jesko wrote:
> Hello,
> 
> I would like to query a layer which gets its data from PostGIS. Which 
> syntax has to be used for the qstring argument of the queryByAttributes 
> function? I tried the usual syntax of a WHERE clause, but it failed. 
> Example:
> 
> queryByAttribures("gid", "gid = 16", MS_MULTIPLE) and 
> queryByAttribures("gid", "gid = 16 OR gid = 17", MS_MULTIPLE) work.
> 
> However, the following calls do not work
> 
> queryByAttribures("gid", "gid = '16'", MS_MULTIPLE)
> queryByAttribures("gid", "gid IN (16, 17)", MS_MULTIPLE)
> 
> In such a case postgres reports a syntax error, because the WHERE clause 
> is incomplete: WHERE (gid = ) resp. WHERE (gid IN ), i.e. the values are 
> missing.
> 
> Do I have to specify the expression differently or is this a bug?
> 
> 
> Thanks,
> Dirk
> 


-- 
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------



More information about the mapserver-users mailing list