[Mapserver-users] Single and Multiple Queries with PHP scripting

Vinko Vrsalovic vinko at cprsig.cl
Mon Mar 3 13:18:08 EST 2003


On Mon, Mar 03, 2003 at 10:18:44AM -0700, Hudspeth, Bill wrote:
> Hello all,
> 
> Does anyone have code and/or explanation on how to construct single and
> multiple queries on layer features using PHP Mapscript?
> 

The GMap demo has query examples... It's on DMSolutions site.

http://www2.dmsolutions.ca/mapserver/dl/

If you also are doing some other stuff that might justify the use of
PostGIS, go for it, I find it a lot more intuitive for us non-GIS
techies to do the queries:

"SELECT attrs FROM spatial_table WHERE <WKT string of the point or box
the query is being made> && <geom_col> AND truly_inside(<geom_col>,<WKT>)";

And because every table is a layer (well, not necessarily, but is
probably the most common case) the multiple/single query issue is trivial to
solve. Also you can do joins/subselects etc, and bring data from other
sources that are not present on the spatial table.


-- 
Vinko Vrsalovic <el[|- at -|]vinko.cl>
http://www.cprsig.cl



More information about the mapserver-users mailing list