[Mapserver-users] RE: help with oid

ryanne cruz ryanne.cruz at up.edu.ph
Fri Jan 31 00:47:46 EST 2003


 
hi list. 
 
does anyone here know of a site that discusses oid? or can anyone here explain 
to me what oid is and how it is used? 
 
i am trying to set the data of a layer with a subselect as its argument. 
example is: 
 
$wind->set(data,"geom from (select geom AS geom from wind where 
provinceid=$provid and distance(wind.geom,(select geom from municipality where 
munprovid=$munprovid))<=0)"); 
 	  
 
but it results to an error: 
 
Warning: MapServer Error in msPOSTGISLayerWhichShapes(): prep_DB:Error 
executing POSTGIS DECLARE statement (0.6 failed - retried 0.5 and it failed 
too). DECLARE mycursor BINARY CURSOR FOR SELECT 
watt_m2::text,asbinary(force_collection(force_2d(geom)),'NDR'),OID::text from 
(select geom AS geom from wind where provinceid=1 and 
distance(wind.geom,(select geom from municipality where munprovid=1))<=0) 
WHERE geom && setSRID('BOX3D(118.267071942857 9.300063,118.638417057143 
9.670539)'::BOX3D, find_srid('','windcipality','geom') ) 
 
and when i tried this: 
 
		 $wind->set(data,"geom from (select geom AS geom from wind 
where provinceid=$provid and distance(wind.geom,(select geom from municipality 
where munprovid=$munprovid))<=0) as new_table using unique mun using 
SRID=-1"); 
 
it reults to this error: 
 
MapServer Error in msPOSTGISLayerWhichShapes(): prep_DB:Error executing 
POSTGIS DECLARE statement (0.6 failed - retried 0.5 and it failed too). 
DECLARE mycursor BINARY CURSOR FOR SELECT 
watt_m2::text,asbinary(force_collection(force_2d(geom)),'NDR'),OID::text from 
(select geom AS geom from wind where provinceid=1 and 
distance(wind.geom,(select geom from municipality where munprovid=1))<=0) 
WHERE geom && setSRID('BOX3D(118.267071942857 9.300063,118.638417057143 
9.670539)'::BOX3D, find_srid('','windcipality','geom') ) 
 
i was thinking that the solution may be with using an oid but i'm not sure 
what it is and how it works. 
 
help!? 
 
ryanne 



More information about the mapserver-users mailing list