select tb_CompanyInfo.co_gsname AS Pgsname,tb_city.citytype AS Pgzdd ,tb_PositionInfo.ID AS PID,tb_PositionInfo.gzxz AS Pgzxz,tb_PositionInfo.zprs AS Pzprs,tb_PositionInfo.gzjy AS Pgzjy,tb_PositionInfo.zhicheng AS Pzhicheng, tb_PositionInfo.zwmc AS Pzwmc, tb_PositionInfo.zyyq AS Pzyyq, tb_PositionInfo.gzjy, tb_PositionInfo.xlyq AS Pxlyq, tb_PositionInfo.xbyq AS Pxbyq, tb_PositionInfo.wyyq AS Pwyyq, tb_PositionInfo.jsjnl AS Pjsjnl, tb_PositionInfo.hj AS Phj, tb_PositionInfo.nlyq AS Pnlyq, tb_PositionInfo.hyzk AS Phyzk, tb_PositionInfo.xjsp AS Pxjsp, tb_PositionInfo.gycd AS Pgycd, tb_PositionInfo.tgss AS Ptgss, tb_PositionInfo.beizhu AS Pbeizhu, tb_PositionInfo.addtime AS Paddtime
from tb_PositionInfo CROSS JOIN tb_CompanyInfo CROSS JOIN tb_city
where tb_PositionInfo.gsname=tb_CompanyInfo.ID AND tb_city.cityID=tb_PositionInfo.gzdd AND ID=" + Request["PID"]
用我教你的那个吧~~~一个一个的来~~不要用组合查询了~太容易出错了~~
AND ID=" + Request["PID"]
这里报错。双引号单个的出现了一个。
你是不是代码粘多了?
select tb_CompanyInfo.co_gsname AS Pgsname,tb_city.citytype AS Pgzdd ,tb_PositionInfo.ID AS PID,tb_PositionInfo.gzxz AS Pgzxz,tb_PositionInfo.zprs AS Pzprs,tb_PositionInfo.gzjy AS Pgzjy,tb_PositionInfo.zhicheng AS Pzhicheng, tb_PositionInfo.zwmc AS Pzwmc, tb_PositionInfo.zyyq AS Pzyyq,( tb_PositionInfo.gzjy)是不是少东西, tb_PositionInfo.xlyq AS Pxlyq, tb_PositionInfo.xbyq AS Pxbyq, tb_PositionInfo.wyyq AS Pwyyq, tb_PositionInfo.jsjnl AS Pjsjnl, tb_PositionInfo.hj AS Phj, tb_PositionInfo.nlyq AS Pnlyq, tb_PositionInfo.hyzk AS Phyzk, tb_PositionInfo.xjsp AS Pxjsp, tb_PositionInfo.gycd AS Pgycd, tb_PositionInfo.tgss AS Ptgss, tb_PositionInfo.beizhu AS Pbeizhu, tb_PositionInfo.addtime AS Paddtime
from tb_PositionInfo CROSS JOIN tb_CompanyInfo CROSS JOIN tb_city
where tb_PositionInfo.gsname=tb_CompanyInfo.ID AND tb_city.cityID=tb_PositionInfo.gzdd AND ID=" + Request["PID"]