<!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> 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 ,how can i do ? Does ogr support "left join" and "where" clause
together?</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>MAP<BR> IMAGETYPE
PNG<BR> #EXTENT 73 10 137
53<BR> EXTENT 116 27 124
35.5<BR> UNITS
DD<BR> SIZE
400 300<BR> #FONTSET "fonts/fonts.list"<BR>
SHAPEPATH "data"<BR>
IMAGECOLOR 255 255 255</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>LAYER # States polygon layer begins here<BR>
DEBUG ON
<BR> NAME
jiangsu<BR> STATUS
DEFAULT<BR>
TYPE
polygon<BR> DEBUG
ON</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> CONNECTIONTYPE ogr<BR>
CONNECTION "/ms4w/apps/gmap/data/jiangsu.shp"<BR> #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> </DIV>
<DIV><FONT size=2> #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> DATA
"SELECT * FROM jiangsu" </FONT></DIV>
<DIV><FONT size=2><BR>
PROJECTION<BR>
"init=epsg:4609"<BR> END</DIV>
<DIV> </DIV>
<DIV> #CLASSITEM "test.Area_name"<BR> #CLASSITEM
"mysqltest.area_name"<BR> CLASS <BR> #
EXPRESSION 'Ganyu'<BR>
COLOR 255 0
255<BR> OUTLINECOLOR 0 132 32<BR>
END<BR> <BR> END # States polygon layer ends
here<BR></DIV>
<DIV> </DIV>
<DIV>END # end of map file/object<BR></FONT></DIV></BODY></HTML>