Plz Help in OGR and MYSQL
grabiel
grabiel at MYWAY.COM
Sat May 6 05:54:23 PDT 2006
Hi
Using command line option i can able to join the shape file and mysql table and displaying the data. The command -->
> ogrinfo /usr/local/apache/htdocs/n_state.shp -sql "SELECT * from >n_state LEFT >JOIN 'MYSQL:test,host=localhost,user=root,table=nsdata'.nsdata ON >n_state.st_nm=nsdata.name"
But when i try to access the same from the map file it showing no resuls or the number of results is zero. Where is the problem?
Plz. share ur experience.
Grabiel
--- On Thu 05/04, Frank Warmerdam < warmerdam at pobox.com > wrote:
From: Frank Warmerdam [mailto: warmerdam at pobox.com]
To: grabiel at MYWAY.COM
Cc: MAPSERVER-USERS at LISTS.UMN.EDU
Date: Thu, 04 May 2006 09:04:31 -0400
Subject: Re: [UMN_MAPSERVER-USERS] Plz Help in OGR and MYSQL
grabiel wrote:<br>> connectiontype ogr<br>> connection "n_state.shp"<br>> DATA "SELECT * from nsdata left join 'MYSQL:test, <br>> host=localhost, user=root'.nsdata ON n_state.st_nm=nsdata.name"<br>> END<br>> END<br>><br><br>Grabriel,<br><br>I think you want:<br><br>SELECT * from n_state LEFT JOIN ...<br><br>The n_state player (from the shapefile) is the primary table.<br><br>You should be able to test the left join from ogrinfo as well using<br>the -sql command option.<br><br>Best regards,<br>-- <br>---------------------------------------+--------------------------------------<br>I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com<br>light and sound - activate the windows | http://pobox.com/~warmerdam<br>and watch the world go round - Rush | President OSGF, http://osgeo.org<br><br>
_______________________________________________
No banners. No pop-ups. No kidding.
Make My Way your home on the Web - http://www.myway.com
More information about the MapServer-users
mailing list