<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.2912" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>hi,all:</FONT></DIV>
<DIV><FONT size=2>&nbsp;&nbsp; I use ogr to connect mysql database and shp file 
with "left join" clause.and i only want to select some part of data from a mysql 
table&nbsp;,how can i do ? Does ogr support "left join" and "where" clause 
together?</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>MAP<BR>&nbsp; IMAGETYPE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
PNG<BR>&nbsp; #EXTENT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 73 10 137 
53<BR>&nbsp; EXTENT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 116 27 124 
35.5<BR>&nbsp; UNITS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
DD<BR>&nbsp; SIZE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
400 300<BR>&nbsp; #FONTSET "fonts/fonts.list"<BR>&nbsp; 
SHAPEPATH&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "data"<BR>&nbsp; 
IMAGECOLOR&nbsp;&nbsp;&nbsp;&nbsp; 255 255 255</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>LAYER # States polygon layer begins here<BR>&nbsp;&nbsp;&nbsp; 
DEBUG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ON&nbsp;&nbsp;&nbsp; 
<BR>&nbsp;&nbsp;&nbsp; NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
jiangsu<BR>&nbsp;&nbsp;&nbsp; STATUS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
DEFAULT<BR>&nbsp;&nbsp;&nbsp; 
TYPE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
polygon<BR>&nbsp;&nbsp;&nbsp; DEBUG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
ON</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>&nbsp;&nbsp;&nbsp; CONNECTIONTYPE ogr<BR>&nbsp;&nbsp;&nbsp; 
CONNECTION "/ms4w/apps/gmap/data/jiangsu.shp"<BR>&nbsp;&nbsp;&nbsp; #DATA 
"SELECT jiangsu_pro.*,test.* FROM jiangsu_pro left join 
'MYSQL:test,host=localhost,user=root,password=491025,table types=memory'.test ON 
jiangsu_pro.JIANGSU_ID= test.Id" </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>&nbsp;&nbsp;&nbsp; #DATA "SELECT jiangsu_pro.*,mysqltest.* 
FROM jiangsu_pro left join 
'MYSQL:test,host=localhost,user=root,password=491025,table 
types=memory'.mysqltest ON jiangsu_pro.JIANGSU_ID= mysqltest.Id <FONT 
color=#ff0000>where mysqltest.Area_data='3'"</FONT> <BR>&nbsp;&nbsp;&nbsp; DATA 
"SELECT * FROM jiangsu" </FONT></DIV>
<DIV><FONT size=2><BR>&nbsp;&nbsp;&nbsp; 
PROJECTION<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
"init=epsg:4609"<BR>&nbsp;&nbsp;&nbsp; END</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp; #CLASSITEM "test.Area_name"<BR>&nbsp;&nbsp; #CLASSITEM 
"mysqltest.area_name"<BR>&nbsp;&nbsp; CLASS <BR>&nbsp;&nbsp; #&nbsp;&nbsp; 
EXPRESSION&nbsp;&nbsp; 'Ganyu'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
COLOR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 255 0 
255<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OUTLINECOLOR 0 132 32<BR>&nbsp;&nbsp; 
END<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;END # States polygon layer ends 
here<BR></DIV>
<DIV>&nbsp;</DIV>
<DIV>END # end of map file/object<BR></FONT></DIV></BODY></HTML>