[UMN_MAPSERVER-USERS] QueryByAttributes with postgresql
Skweda O'Bomsawin
sobomsawin at KASSINI.COM
Mon Oct 4 11:53:31 PDT 2004
Claudio,
Take a look at the case of your column name... Most of the time, the
shp2pgsql change the case of the columns name and you must adjust your code
in consequence...
Hope this will help.
Skweda O'Bomsawin
-----Message d'origine-----
De : UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] De la
part de Claudio Cesar Trevisani
Envoyé : 4 octobre 2004 13:10
À : MAPSERVER-USERS at LISTS.UMN.EDU
Objet : [UMN_MAPSERVER-USERS] QueryByAttributes with postgresql
Hi,
I'm from Brazil. For first, excuse my english!!!
When I use the function "querybyattributes" in a shapefile, everthing is
OK!!! Wherever, after export my shapefile to postgresql (use shp2pgsql),
this function (querybyattributes) don't work...(nothing appear);
This is my php code:
$oLayBairro = $map->getLayerByName("lotes");
$expressao = "entityid=".$GET_["PARCEL-NUMBER"]; echo $expressao;
if (($oLayBairro->querybyattributes("entityid",$expressao,
MS_SINGLE))==MS_SUCCESS){
echo "passou";
$oResult = $oLayBairro->getResult(0);
$oLayBairro->open();
//echo $oLayBairro->getclass(0);
$oZoomTo = $oLayBairro->getShape(-1,$oResult->shapeindex);
$nminx = $oZoomTo->bounds->minx - 100;
$nminy = $oZoomTo->bounds->miny - 100;
$nmaxx = $oZoomTo->bounds->maxx + 100;
$nmaxy = $oZoomTo->bounds->maxy + 100;
$map->setextent($nminx, $nminy, $nmaxx, $nmaxy);
Somebody Help me, please.
Claudio C. Trevisani.
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 2004-09-28
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 2004-09-28
More information about the MapServer-users
mailing list