[mapserver-users] BINVALS is supported by PostGIS 1.5?
Fujioka (Duke)
efujioka at duke.edu
Thu Mar 25 21:00:54 PDT 2021
Hello Mapserver experts!
I googled BINVALS but couldn't find any useful information.
What I want to achieve is to include a placeholder in DATA and
substitute it using BINVALS.
Simplified example:
LAYER
CONNECTION "user=xxx password=xxx dbname=xxx host=xxx"
CONNECTIONTYPE POSTGIS
DEBUG 5
DATA "geom from (select column1, geom, count(*) from table1 where
column1 = $1 group by column1, geom) AS foo USING UNIQUE column1 USING
SRID=4326"
BINDVALS
"1" "10"
END
END
I expect the final query would be "select ... where column1 = 10 group
by ...". But the map image does not show anything. It's a gray image.
When I set "DEBUG 5" at the layer level and took a look at the debug
info, the placeholder was not substituted (it was still "where column1 =
$1..."). So, it seems BINDVALS is not working.
Any tips on this? Does the complexity of the query matter (e.g. can't
use GROUP BY or JOIN)? Should the query in the debug info be the final
one with the placeholder substituted with the value specified in BINDVALS?
I use Mapserver 6.4 & PostGIS 1.5 & PostgreSQL 9.1. Is BINDVALS not
supported for these versions?
Also, how can I change the bind value using PHP Mapscript (say, from
"10" to "20")?
Thanks,
--
========================
Ei Fujioka
Research Scientist
Nicholas School
Duke University
(919) 684-3518
efujioka at duke.edu
========================
More information about the MapServer-users
mailing list