留言系统留言后给数据库中加一记录,记录发表的留言的数量,reviewcount
(类型numeric)更新记录代码如下:
set rs=server.createobject("adodb.recordset")
sql="select review,reviewcount from learning where articleid="&articleid
rs.open sql,conn,3,3
rs("reviewcount")=rs("reviewcount")+1
rs("review")=rs("review")&"<br><img src=images/mood"&face&".gif><font color=red> 评论者:</font><a href=""mailto:"&reviewemail&""">"&reviewname&_
"<a><font> </font><font face=""Wingdings""></font><font color=red>个人网页:</font><a href="""&reviewurl&""">"_
&reviewurl&"</a><table bgcolor=""#F7F7F7"" cellspacing=""0"" cellpadding=""5"" border=""0"" width=""100%"" align=""center""><tr><td width=""100%"" style=""font-size:9pt""><strong><font color=green>"&reviewtitle&"</font></strong><br>"&_
review&"<br><br><font style=""font-size:8pt"">--发表日期:"&date()&"<br>[来自: "&ip&"]</font><br></td></tr></table> "
rs.update
response.redirect "re.asp?ID="&clng(request("id"))
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
执行提示:
rs("reviewcount")=rs("reviewcount")+1
错误请高人看看,我不知道错在那里了