问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

当前用户添加信息成功时,让表内tgzs字段值+1 ,该写在哪里?附代码_百度...

发布网友 发布时间:2024-07-03 12:00

我来回答

1个回答

热心网友 时间:2024-07-14 18:06

信息记录的表是sd_info ,下面是添加信息的代码:

(用户表是sd_members,有一个字段是tgzs 默认是0,当添加一个信息时,让tgzs+1,该怎么加,加在哪里,谢谢了。)

代码
<%
End Sub
Sub Save
adddate=trim(request("adddate"))
t0=trim(request("t0"))
t1=trim(request("t1"))
t2=trim(request("t2"))
t3=trim(request("t3"))
t4=request("t4")
t5=trim(request("t5"))
t6=trim(request("t6"))
t7=trim(request("t7"))
t8=trim(request("t8"))
t9=trim(request("t9"))
t10=trim(request("t10"))
t11=trim(request("t11"))
t13=trim(request("t13"))
t15=trim(request("t15"))
t16=Replace_filename(dir_check(trim(request("t16"))))
t17=trim(request("t17"))
t17=Re(t17," "," ")
t17=Re(t17," ",",")
t17=Re(t17," ",",")
t17=Re(t17,",",",")
t17=check_event(t17,",")
t18=trim(request("t18"))
t19=Requestint(trim(request("t19")),0)
t20=Requestint(trim(request("t20")),0)
t21=trim(request("t21"))
t22=Requestint(trim(request("t22")),0)
IF t20=0 Then
Sdcms_Label=Split(t17,",")
LikeID=Empty
Set LikeIDData=Server.CreateObject("Scripting.Dictionary")
For I=0 To Ubound(Sdcms_Label)
Set Rs=Conn.Execute("Select top 5 ID From "&Sd_Table&" Where Title Like '%"&Sdcms_Label(I)&"%'")
While Not Rs.Eof
IF LikeIDData.Exists(Rs(0)) Then LikeIDData.Item(Rs(0))=Rs(0)&"," Else LikeIDData.Add Rs(0),Rs(0)&","
Rs.MoveNext
Wend
Next
LikeIDtag=LikeIDData.keys
LikeIDval=LikeIDData.items
IF LikeIDData.Count>=1 Then
For I=0 To LikeIDData.Count-1
LikeID=LikeID&LikeIDval(i)
Next
End IF
Set LikeIDData=Nothing
IF Len(LikeID)>0 Then t21=LikeID
End IF
t21=Check_Event(t21,",")
IF Len(t21)=0 Then t21=0
up1=trim(request("up1"))
up2=trim(request("up2"))
up3=trim(request("up3"))
up4=trim(request("up4"))
up5=trim(request("up5"))
up6=Requestint(trim(request("up6")),0)
IF up6=1 Then
Set P=New Get_Pinyin
t16=P.Pinyin(t0)
Set P=Nothing
End IF
IF t15<>"" And t2=0 then t4=ReplaceRemoteUrl(t4,"","","","")
t5=RequestInt(t5,0)
t12=Check_ispic(t11)
t14=is_sdcms(t11)

IF Len(t6)=0 Then t6=0
IF Len(t7)=0 Then t7=0
IF Len(t8)=0 Then t8=0

Set Rs=Server.CreateObject("adodb.recordset")

sql="select top 1 * from "&sd_table&""
IF act="save" Then
sql=sql&" where id="&id&""
End IF
Rs.Open Sql,Conn,1,3

IF Act="add" Then
Rs.Addnew
Else
Rs.Update
End IF
IF Rs("title")=""&t0&"" Then
Ischanage=0
Else
Ischanage=1
End IF
rs("title")=Left(t0,255)
rs("author")=Left(t1,50)
rs("isurl")=t2
IF t2=1 Then
rs("url")=Left(t3,255)
Else
rs("content")=t4
End IF
rs("hits")=Left(t5,6)
问题补充:IF Len(up3)>0 Then
part_classid=get_part_classid(t13)
IF Instr(part_classid,",")>0 Then
part_classid=Split(part_classid,",")
For i=0 to Ubound(part_classid)
sdcms_c.Create_class_list part_classid(i)
Next
Else
sdcms_c.Create_class_list t13
End IF
End IF
IF Len(up5)>0 Then sdcms_c.Create_info_show id
IF t19>0 And Len(up5)>0 Then sdcms_c.Create_Topic t19
IF act="save" And Len(up5)>0 Then Conn.Execute("update "&sd_table&" set iscreate=1 where id="&id&"")
IF Len(up2)>0 Then sdcms_c.Create_index
Del_Cache("comment"&id):Del_Cache("comment_"&id)
Echo "信息保存成功"
Set sdcms_c=Nothing
End Sub
Sub makehtml
End Sub

热心网友 时间:2024-07-14 18:11

信息记录的表是sd_info ,下面是添加信息的代码:

(用户表是sd_members,有一个字段是tgzs 默认是0,当添加一个信息时,让tgzs+1,该怎么加,加在哪里,谢谢了。)

代码
<%
End Sub
Sub Save
adddate=trim(request("adddate"))
t0=trim(request("t0"))
t1=trim(request("t1"))
t2=trim(request("t2"))
t3=trim(request("t3"))
t4=request("t4")
t5=trim(request("t5"))
t6=trim(request("t6"))
t7=trim(request("t7"))
t8=trim(request("t8"))
t9=trim(request("t9"))
t10=trim(request("t10"))
t11=trim(request("t11"))
t13=trim(request("t13"))
t15=trim(request("t15"))
t16=Replace_filename(dir_check(trim(request("t16"))))
t17=trim(request("t17"))
t17=Re(t17," "," ")
t17=Re(t17," ",",")
t17=Re(t17," ",",")
t17=Re(t17,",",",")
t17=check_event(t17,",")
t18=trim(request("t18"))
t19=Requestint(trim(request("t19")),0)
t20=Requestint(trim(request("t20")),0)
t21=trim(request("t21"))
t22=Requestint(trim(request("t22")),0)
IF t20=0 Then
Sdcms_Label=Split(t17,",")
LikeID=Empty
Set LikeIDData=Server.CreateObject("Scripting.Dictionary")
For I=0 To Ubound(Sdcms_Label)
Set Rs=Conn.Execute("Select top 5 ID From "&Sd_Table&" Where Title Like '%"&Sdcms_Label(I)&"%'")
While Not Rs.Eof
IF LikeIDData.Exists(Rs(0)) Then LikeIDData.Item(Rs(0))=Rs(0)&"," Else LikeIDData.Add Rs(0),Rs(0)&","
Rs.MoveNext
Wend
Next
LikeIDtag=LikeIDData.keys
LikeIDval=LikeIDData.items
IF LikeIDData.Count>=1 Then
For I=0 To LikeIDData.Count-1
LikeID=LikeID&LikeIDval(i)
Next
End IF
Set LikeIDData=Nothing
IF Len(LikeID)>0 Then t21=LikeID
End IF
t21=Check_Event(t21,",")
IF Len(t21)=0 Then t21=0
up1=trim(request("up1"))
up2=trim(request("up2"))
up3=trim(request("up3"))
up4=trim(request("up4"))
up5=trim(request("up5"))
up6=Requestint(trim(request("up6")),0)
IF up6=1 Then
Set P=New Get_Pinyin
t16=P.Pinyin(t0)
Set P=Nothing
End IF
IF t15<>"" And t2=0 then t4=ReplaceRemoteUrl(t4,"","","","")
t5=RequestInt(t5,0)
t12=Check_ispic(t11)
t14=is_sdcms(t11)

IF Len(t6)=0 Then t6=0
IF Len(t7)=0 Then t7=0
IF Len(t8)=0 Then t8=0

Set Rs=Server.CreateObject("adodb.recordset")

sql="select top 1 * from "&sd_table&""
IF act="save" Then
sql=sql&" where id="&id&""
End IF
Rs.Open Sql,Conn,1,3

IF Act="add" Then
Rs.Addnew
Else
Rs.Update
End IF
IF Rs("title")=""&t0&"" Then
Ischanage=0
Else
Ischanage=1
End IF
rs("title")=Left(t0,255)
rs("author")=Left(t1,50)
rs("isurl")=t2
IF t2=1 Then
rs("url")=Left(t3,255)
Else
rs("content")=t4
End IF
rs("hits")=Left(t5,6)
问题补充:IF Len(up3)>0 Then
part_classid=get_part_classid(t13)
IF Instr(part_classid,",")>0 Then
part_classid=Split(part_classid,",")
For i=0 to Ubound(part_classid)
sdcms_c.Create_class_list part_classid(i)
Next
Else
sdcms_c.Create_class_list t13
End IF
End IF
IF Len(up5)>0 Then sdcms_c.Create_info_show id
IF t19>0 And Len(up5)>0 Then sdcms_c.Create_Topic t19
IF act="save" And Len(up5)>0 Then Conn.Execute("update "&sd_table&" set iscreate=1 where id="&id&"")
IF Len(up2)>0 Then sdcms_c.Create_index
Del_Cache("comment"&id):Del_Cache("comment_"&id)
Echo "信息保存成功"
Set sdcms_c=Nothing
End Sub
Sub makehtml
End Sub
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
美的面包机和面要多久 美的面包机和面的时间要多长 美的面包机怎么用手动操作 如何用美的面包机发面 如何用美的面包机和面 美的面包机如何和面 CDR教程—教你如何使用CorelDRAW复制图形方法 苹果手机微信怎么换漂亮字体(苹果手机微信怎么换行输入) 有什么好用的app转换字体 手写转文字的软件 erp可以看评论地址吗 淘宝评论url是什么意思? 若a²=a+1,b²=b+1,且a≠b,求a&amp;sup4+b&amp;sup4的值。 两题英语,快速,谢谢 洗衣机脱水转速怎么调节好呢? 我头疼7年了。一用脑思考就头疼,我想考研究生,可是头疼的不能学习,请... 洁净室传递窗传递窗原理 传递窗传递窗操作规范 波轮洗衣机脱水转速多少最快? 如何用词表达一个人的捐款? 有哪些给鮟鱇鱼去腥的技巧分享? 鮟鱇的肉质有什么特点? 惜光明组合对飞蚊症效果怎么样? 男性大腿内侧瘙痒是什么原因 Adidasnmd的鞋码和Aj一样吗 在贵阳想治飞蚊症,到底该怎么办? 房屋拆迁不服可以什么时候提起行政诉讼吗 拆迁纠纷可以分哪些步骤提起诉讼? 拆迁补偿不合理,我该什么时候提起诉讼? 先贴膜还是先装行车记录仪 杭州演艺集团有限公司电话是多少? 普通陈皮多少钱一斤 青衣小儿是什么意思? a+b=3 a²+b²-ab=4 求:a&amp;sup4;+a³b+ab³+b&amp;sup4;=多少? 电机测扭矩哪家口碑好? 已知a,b,c为△ABC的三边,且满足a²c²-b²c²=a&amp;sup4-b&amp;s... 我说到却没有做到惹我女朋友要跟我分手了怎么办? 应援小卡制作尺寸 ...飞行堡垒[FX63VD/FZ63VD/ZX63VD(板型FX503VD)]屏幕是多大的?_百 ... 家里的钱被儿子的同学偷了,怎么办 买卖不破租赁可以增加租金吗? 换新电源不能开机 城镇户口就是城镇居民吗 工伤欠医院十万老板不理怎么出院 为什么我什么也没做,女友要和我分手? 新电源无法启动电脑 FIFA足球世界市场卖球员机制介绍_FIFA足球世界市场卖球员机制是什么 梅西是什么梗 女朋友突然间发神经要跟我分手,我也从没有做对不起她的事,一直对她挺... 我是工伤,老板让走医疗,资料已经给医院医院了,还没出院,可以反悔吗? 崽妹益阳是什么意思? ...找出来了多年前的电脑主板,可是接好了却开不开机,有哪位懂眼的大神...