strSQL = "select distinct table3.Phone from table3 inner join table2"
strSQL = strSQL & " on table3.id = table2.phone_id where table2.商品种类id = 1"rst.open strSQL, cnn
do until rst.eof
list1.additem rst!phone
rst.movenext
loop
rst.close
set rst = nothing
strSQL = strSQL & " on table3.id = table2.phone_id where table2.商品种类id = 1"rst.open strSQL, cnn
do until rst.eof
list1.additem rst!phone
rst.movenext
loop
rst.close
set rst = nothing
set rst=new adodb.recordset
rst.open "select 表一.商品种类,表二.商品种类id,表二.phone_id,表三.id,表三.phone from 表一,表二,表三 where 表一.商品种类=表二.商品种类id and 表二.phone_id=表三.id"
do while not rst.eof
list1.AddItem rst(4)
rst.MoveNext
loop
rst.close
SELECT 表三.phone FROM 表三,表二 WHERE 表二.商品种类id=1?
do until rst.eof
list1.additem rst!phone
rst.movenext
loop
rst.close
set rst = nothing