关于函数使用的简单小问题
我有现在有个随机函数
<%
Function RndNumber(MaxNum,MinNum)
Randomize
RndNumber=int((MaxNum-MinNum+1)*rnd+MinNum)
RndNumber=RndNumber
End Function
%>
我需要把函数放在以下ASP中使第一行中的VIEW+1变成VIEW+随机
<%
sql = "update postings set views = views + 1 where id = " & id
conn.Execute(sql)
sql = "select title, id, autor, mail, views, replies, datum, datum_updated, message from postings where id = " & id
set rs = conn.Execute(sql)
%>
怎么改.我自己改的没有通过..麻烦高手指点下
<%
DIM SJ
SJ=response.write RndNumber(30,10)
sql = "update postings set views = views + SJ where id = " & id
conn.Execute(sql)
sql = "select title, id, autor, mail, views, replies, datum, datum_updated, message from postings where id = " & id
set rs = conn.Execute(sql)
%>