日期:2014-05-17  浏览次数:20804 次

求助???,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
怎么可以像你前面那样写呢?