Plz Help in OGR and MYSQL

grabiel grabiel at MYWAY.COM
Thu May 4 08:47:36 EDT 2006



 Hi
   I am still facing problems with OGR, mapfile and MySql. I have installed the GDAL/OGR and its working fine. Also from command line(using ogrinfo --) i can able to fetch the datas from mysql table. But when i try to connect MySql from mapfile i am getting an error.

The error looks like-->

 > Warning:[Mapserver Error]: msogrfileopen(): ExecuteSql(SELECT * >FROM nsdata
 > left join 'MYSQL:test,host=localhost, user=root'.nsdata ON >n_state.st_nm=nsdata.name) failed
> SELECT from table nsdata failed, no such table/feature class in  
>/usr/local/apache/htdocs/gmap/htdocs/gmap75.inc.php on line 506
>Warning:[Mapserver Error]: msQueryByPoint(): No Matching records >found. in /usr/local....../gmap.inc.ohp 
>on line 506

>Fatal Error: Call to a member function on a non object .....

 What i am trying here is to connect the MySql table named nsdata(contains feature data) and relate it to the n_state.shp. My mapfile stuff now looks like->

   layer
        name "n_state"
        Type point
        Status off
        classitem "st_nm"
        class
          name "Neighbouring state"
          expression /A*/
          color 255 0 0
          ...
         end
        connectiontype ogr
        connection "n_state.shp"
        DATA "SELECT * from nsdata left join 'MYSQL:test,   
    host=localhost, user=root'.nsdata ON n_state.st_nm=nsdata.name"
 END
END

 The error of mapserver suggests that, it is not getting the MySql table nsdata

Any explanation/Explanation wil be highly appreciated.

With regards
Grabiel







 



_______________________________________________
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