asp update 代码

网摘 2011-01-03

<%
dim up_name
up_name=request.Form("up_name")
dim up_word
up_word=CInt(request.Form("up_word"))

Set Command1 = Server.CreateObject ("ADODB.Command")
Command1.ActiveConnection = MM_net_STRING
Command1.CommandText = "UPDATE g_main  SET g_type ="&up_word&" WHERE  g_name like '%"&up_name&"%'"
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()

%>

关注这里up_word是数字类型。还有一个where的like

希望50年后它依然存在,让我感觉我一直在做一件稍微有点cool的事情 喜欢一起交个朋友吧 微信/QQ :56280295

Leave a Reply

Your email address will not be published. Required fields are marked *