首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

?ASP数据库查询语句出错,帮帮找找原因~

2012-03-01 
求助???,ASP数据库查询语句出错,帮帮找找原因~~语句如下:if(selectcount(*)frompodwheremani_id &Fmani_

求助???,ASP数据库查询语句出错,帮帮找找原因~~
语句如下:
if   (select   count(*)   from   pod   where   mani_id= "&Fmani_id& ")=0    
then  
  ................此处为插入数据库语句

else
  ...............此处为错误提示

上面的Fmani_id是一个变量


当我运行是,出现:
  语法错误
/QSsave.asp,   line   115,   column   3
if   select   count(*)   from   pod   where   mani_id= "&Fmani_id& "=0   then
--^



[解决办法]
就算你打开了数据库,也没有这个写法的,
(select count(*) from pod where mani_id= "&Fmani_id& ")=0 ?????
这句话什么意思?????
你至少也要
select count(*) as cou_a from pod where mani_id= "&Fmani_id& "之后
if cou_a=0 then
...............
else
..........
end if
怎么可以像你前面那样写呢?

热点排行