[Geomoose-users] query.php results to CSV
Matej Mailing
mailing at tam.si
Tue Sep 8 12:16:39 PDT 2015
I have checked the code of mailing labels, but it seems to be using
sqlite db. My goal is to export exactly the same results as query.php
from GM is returning (with their comparitors etc.).
Basically in the query.php all the data is returned via
$map->processquerytemplate(array(), MS_FALSE);
which is filtered with
$queryLayer->setFilter($filter_string);
The data is returned from Mapserver and as the last resort I can build
the pgsql query myself from the $filter_string and the name of the
layer, but I am looking for a solution where it would work for any
layer (for example we provide a Mapfile/Layer information here, but in
the pgsql way you need table name, authentication params etc., which
of course are already defined in the Mapfile ....)
The ideal solution would be to somehow get a generated query that
Mapserver runs when it pulls out the results and just iterate through
them and output as CSV - but I can't find any useful method in
Mapscript documentation for that. Any ideas are very welcome :-)
Hopefully I am not being too confusing with this :-)
Thanks,
Matej
2015-09-08 18:25 GMT+02:00 Dan Little <theduckylittle at gmail.com>:
> You might want to take a look at the mailing labels code, we do
> exactly that in there.
>
> On Tue, Sep 8, 2015 at 6:24 AM, Matej Mailing <mailing at tam.si> wrote:
>> Hi,
>>
>> what would be the best way to export query.php results as CSV?
>>
>> Thanks!
>> _______________________________________________
>> Geomoose-users mailing list
>> Geomoose-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/geomoose-users
More information about the Geomoose-users
mailing list