Problems with queryByAttributes...

Juan Antonio Fernandez Prada juanantonio.fernandez at UCA.ES
Mon Sep 12 12:32:26 EDT 2005


Hi List!

I'm trying to do a query by attributes with php, but I've got several
problems. I've got some shapes, and I make a query with this code:

$oMap =ms_newMapObj("../data/campuspr.map" );
$mySearchLayer = $oMap->getLayerByName("FCC_P0");
$result =$mySearchLayer->queryByAttributes("FID","104",MS_SINGLE);
$myresultImg = $oMap->drawQuery($result);

In my shape, the field FID is the key field, but it produces the following
error: "Warning: [MapServer Error]: msDBFGetItemIndex(): Item 'FID' not
found".

I tried to do the same with all the field of the table of the shape, but
the error is the same. After a week trying it, now I haven't got any idea
abaut do it. Could anybody help me?

Thanks and regards to all.

Juan Antonio Fernández Prada.
Laboratorio de Astronomía, Geodesia y Cartografía.
Universidad de Cádiz.
e-mail: juanantonio.fernandez at uca.es



More information about the mapserver-users mailing list