当前位置: 代码迷 >> ASP >> 高手在那?帮忙改一下,多表查询,多谢啦
  详细解决方案

高手在那?帮忙改一下,多表查询,多谢啦

热度:88   发布时间:2012-02-15 12:09:44.0
高手在那?帮忙改一下,多表查询,谢谢啦。
sql_   =   "select   *   from   tabJob   where   Com   =   tabCom.Company   (where   tabCom.UserName=session( "Email ")) "
目的:要查询tabJob表中的字段,有三张表,关系是
                                      tabJob(Com)------tabCom(Company)

                                      tabCom(UserName)-----tabUser(Email)
                                   
                                      Email=session( "Email ")
    Email是传过来的


------解决方案--------------------
select * from tabjob as j,tabcom as c,tabuser as u where u.username = c.username and c.company = j.com and u.email = 'mail地址 '
------解决方案--------------------
自用计算机图书要出售

http://store.taobao.com/shop/view_shop.htm?asker=wangwang&shop_nick=chens616
------解决方案--------------------
email=session( "Email ")

sql_ = "select * from tabJob as A left join tabJob as B on A.id=B.id left join tabUser as C on A.id=C.id where A.Com=B.Company and B.UserName= " '&email& ' "
  相关解决方案