[MapServer Error]: msQueryByPoint(): No matching record(s) found. /OGR/MYSQL

grabiel grabiel at MYWAY.COM
Tue May 9 03:18:04 EDT 2006



Hi
   The problem is solved, Its the template file that i have not set in my mapfile. I will try to put a documentation on OGR/MYSQL/PHP
in the list.

Thanks to all
With regards
Grabiel


 --- On Mon 05/08, Frank Warmerdam < warmerdam at POBOX.COM > wrote:
From: Frank Warmerdam [mailto: warmerdam at POBOX.COM]
To: MAPSERVER-USERS at LISTS.UMN.EDU
Date: Mon, 8 May 2006 09:26:09 -0400
Subject: Re: [UMN_MAPSERVER-USERS] [MapServer Error]: msQueryByPoint(): No matching record(s) found. /OGR/MYSQL

grabiel wrote:<br>>  Hi<br>>    I have posted one message for ogr/mysql problem(No reply so far). If anyone has implemented ogr/mysql/php Plz. help me out. What i am trying is to relate a shape file with mysql table. I can able to fetch the data through ogrinfo in command line which is like this---><br>>    <br>> [root at localhost bin]ogrinfo /usr/local/apache/htdocs/gmap/htdocs/data/n_state.shp -sql "SELECT st_nm, nsdata.name,nsdata.capital,nsdata.id from n_state<br>> LEFT JOIN 'MYSQL:test,host=localhost,user=root,tables=nsdata'.nsdata ON n_state.st_nm=nsdata.name"<br>> <br>> The command above woks fine but when i try the same from mapfile, I am getting the following error. <br>>> Warning: [MapServer Error]: msQueryByPoint(): No matching record(s) found. <br>>> in /usr/local/apache/htdocs/gmap/htdocs/gmap75.inc.php on line 425<br>>  <br>>  The error above is only for the layer where i have used OGR/MySql table, whereas for layers where i havenot used OGR/MySql(simply shape 
file & Metadata) its showing the results.<br>>      <br>> My mapfile code for ogr is something like this--> <br>...<br>> LAYER<br>>     NAME "n_state"<br>>     TYPE POINT<br>>     CONNECTIONTYPE OGR<br>>     CONNECTION "/usr/local/apache/htdocs/gmap/htdocs/data/n_state.shp"<br>>     DATA "SELECT * from n_state left join 'MYSQL:test,host=localhost,user=root,tables=nsdata'.nsdata ON n_state.st_nm=nsdata.name"<br>>     STATUS ON<br>>     CLASSITEM "st_nm"<br>>     CLASS<br>>         NAME "NEIGHBOURING STATE"<br>>         EXPRESSION /A*/ <br>>         COLOR 255 0 0<br>>         OUTLINECOLOR 255 0 0<br>>         SYMBOL "NS"<br>>     END<br>> END<br><br>Grabriel,<br><br>Have you verified with ogrinfo that the attribute st_nm appears with the<br>expected values?<br><br>Try:<br><br>   ogrinfo -ro /usr/local/apache/htdocs/gmap/htdocs/data/n_state.shp \<br>    -sql "SELECT * from n_state left join<br>          'MYSQL:test,host=localhost,user=root,tables=nsdata'.nsdata ON<br>          
n_state.st_nm=nsdata.name"<br><br>If everything looks ok there, then you might review your use of EXPRESSION.<br>It looks ok to me, but I'm not sure.<br><br>Good luck,<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>

_______________________________________________
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