[Mapserver-users] Read all fields of dbf file when querying

Daniel Morissette morissette at dmsolutions.ca
Thu Aug 7 09:14:40 EDT 2003


Stefan Schwarzer wrote:
> 
> can anyone give me a hint/an example on how can I read with 
> mapscript/PHP *all fields* in the dbf-part of a shapefile? For a couple 
> of layers I would like to display upon a query request all fields - and 
> not those predefined in the METADATA tag.
> 

When you read query results using $layer->getShape(), the shapeObj 
contains an array member called 'values' that contains all the field 
values for this shape.  See the shapeObj docs at 
http://mapserver.gis.umn.edu/doc40/phpmapscript-class-guide.html#ShapeObj

-- 
------------------------------------------------------------
  Daniel Morissette               morissette at dmsolutions.ca
  DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------




More information about the mapserver-users mailing list