How to get/use a Query Result for further processing?
mholger at OPTERA.NET
Fri Aug 20 15:30:33 EDT 2004
On Fri, Aug 20, 2004 at 02:15:12PM -0500, BONNER S KARGER wrote:
> I've been trying to do this with PHP, and have not found a good way as of yet (or any successful way). You can process query results on the query template, but not on the mapping page that gets sent to the CGI...for example, the PHP code would not be processed when sent to the CGI.
> Thank you
I rather quickly gave up on the concept of using MapScript's query
functions. It was much easier (for my purposes anyway), to just pass the
bounding box back to my PHP code, and let it transform the pixels to geospatial
coordinates, then let PHP do the database work and result page generation.
However (and, I haven't tried this, just to warn you), it might be possible
to set up a layer in your MAP file that uses OGR/VRT to connect to an ODBC
data source, and embed the OGR entry into the MAP file (As opposed to using
an external OVF file), whereby you should have access to some %variables
which are actually parameters passed to the CGI...then, you can use any ODBC
data source available to you, and you can have some (limited) control over
the queries being run to generate data...
...assuming that makes /any/ sense whatsoever... ;)
More information about the mapserver-users