[Mapserver-users] Read all fields of dbf file when
querying
Chip Hankley
Chip.Hankley@rmtinc.com
Thu, 07 Aug 2003 10:33:23 -0500
function () {
...
//Get the names of the fields in the DBASE file by doing 'array-keys' on
// the first record in the database when you use the php
// 'dbase_get_record_with_names' command
$db_fields = array_keys(dbase_get_record_with_names ($dbi, 1));
dbase_close($dbi);
//Get rid of the SHAPE field, it will be called "DELETED"
$db_fields = array_filter($db_fields, "ResultFieldFilter");
...
//Loop through all of the fields to get the results
foreach($db_fields as $a) {
$tRes = $oShape->values[$a];
...
}
...
}
function ResultFieldFilter($var) {
return($var <> 'deleted');
}
Chip Hankley
Outgoing messages, along with any attachments, are scanned for viruses at RMT prior to sending.
------------------------------------------------------------------------------
NOTICE--This email may contain confidential and privileged information
for the sole use of the intended recipient. Any review or distribution
by others is strictly prohibited. If you are not the intended recipient,
please contact the sender immediately and delete all copies.
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users