Problem with queryByAttributes
Dirk Jesko
ml.dje at GEOCONTENT.DE
Thu Feb 8 08:32:31 PST 2007
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
More information about the MapServer-users
mailing list