[mapserver-users] PHP Mapscript - Query a Standalone File Geodatabase Table using queryByAttributes

Joseph Jeurissen jjeurissen at houstoneng.com
Mon Oct 8 08:44:34 PDT 2012


Hello,

Sorry for posting in the wrong section before.  Has anyone ever queried a standalone file geodatabase table that doesn't have any geometry associated with it?  I am able to query feature classes that have points just fine.   You shouldn't have to define an extent or have geometry if you are just querying the attributes, right?  Every time the script is ran it just returns a 500 status error.  The Apache log only shows: "Premature end of script headers: mapserv.exe".   I am using Mapserver 6.0.3 and PHP 5.3.10.

Here is the relevant PHP code:
                                $map = ms_newMapObj($path);
                                $layer = $map->getLayerByName($info[1]);
                                $layer->set('status', MS_DEFAULT);
                                $layer->set('template', $layer->getMetaData('identify_record'));
                                $layer->queryByAttributes("COUNTY_NO",$COUNTY_NO, MS_SINGLE);
                                $results = $map->processquerytemplate(array(), false);

And here is the mapfile that I am using:
MAP
                NAME 'SSTS_Abandonment'
                STATUS ON
                LAYER
                               NAME SSTS_Abandonment
                               CONNECTIONTYPE OGR
                               CONNECTION 'E:\websites\maps\data\Zoning\Zoning.gdb'
                               DATA 'SSTS_Abandonment'
                               STATUS ON
                                TYPE QUERY
                                METADATA
                                                'identify_record' 'SSTS_Abandonment_identify.html'
                                END
                END #LAYER
END #MAP FILE

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20121008/5232b159/attachment.htm>


More information about the MapServer-users mailing list