Hi Armin,
thanks for the info. I added the quotes in the PHP code. This should
work until a new stable version is published.
Dirk
Armin Burger wrote:
Dirk
I was wondering that your first 2 queries worked. There seems to be a
bug in Mapserver 4.10 and filters and attribute queries on PostGIS
that requires to submit literal double quotes, like
queryByAttribures("gid", "\"gid = '16'\"", MS_MULTIPLE)
otherwise the WHERE clause gets truncated. I read that it is fixed in
CVS, but so far no stable release with these bug fixes is available.
armin
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