UPDATE aps_tailor_instruction_detail_rec o, (SELECT atailorAssemblyLineId,atailorAssemblyLineCode,adeptId,cname tailorAssemblyLineName,bid productionSubPlanDetailId,aid productionSubPlanId,aplanNumber
FROM aps_production_sub_plan a,aps_production_sub_plan_detail b,md_tailor_assembly_line c WHERE aid=bproductionSubPlanId AND atailorAssemblyLineId=cid
AND bid=79751 AND afactoryId=46 AND adisabled=0) n
SET otailorAssemblyLineId = ntailorAssemblyLineId, otailorAssemblyLineCode = ntailorAssemblyLineCode,odeptId = ndeptId,otailorAssemblyLineName = ntailorAssemblyLineName,
oproductionSubPlanId=nproductionSubPlanId,osubPlanNumber=nplanNumber,oproductionSubPlanDetailId=nproductionSubPlanDetailId
WHERE instructionNumber IN ('CZ22010136','CZ22010137','CZ22010140') AND factoryId=46 AND disabled=0 AND size='170/92A'
AND oproductionSubPlanId=5572
我帮你修改了 ,你仔细看看吧,或者复制下来 运行试试,应该没有问题的。
你可以Hi我:
<html>
<body>
<table><tr><td height="50" align="center" style="font-size:12px;">留言列表:<br/>
<%
actions=trim(request("act"))
if actions = "ok" then
xiaotang1=trim(request("xiao1"))'姓名
xiaotang2=trim(request("xiao2"))'地址
xiaotang3=trim(request("xiao3"))'QQ
xiaotang4=trim(request("xiao4"))'内容
if xiaotang1 = "" and xiaotang2 = "" and xiaotang3 = "" and xiaotang4 = "" then
responsewrite "<script>alert('留言所有内容不得为空')<"&"/script>"
responseEnd()
end if
%>
<%
dim conn,sql,rs
set conn = servercreateobject("adodbconnection")
connstring="Provider = MicrosoftJetOLEDB40;Data Source="&servermapPath("db2mdb")
connopen connstring
sql ="insert into liuyan(name,qq,address,content) values('"&xiaotang1&"','"&xiaotang3&"','"&xiaotang2&"','"&xiaotang4&"')"
connexecute sql '这个方法用来执行sql语句
Set rs = ServerCreateObject("ADODBRecordset")
sql = "select from liuyan order by id desc"
rsopen sql, conn, 1, 3
if not (rseof or rsbof) then
rspagesize = 8
if isnumeric(requestquerystring("page")) then
if requestquerystring("page")="" or cint(requestquerystring("page")) < 1 then
rsabsolutepage = 1
elseif cint(requestquerystring("page")) > rspagecount then'这里内嵌的IF循环一定要和else 写在连在一起,不然还要写个end if
rsabsolutepage = rspagecount
else
rsabsolutepage = requestquerystring("page")
end if
else
rsabsolutepage = 1
end if
%>
<p align="center">一共有<%=rsrecordcount%>条数据</p>
<p align="center">
<%
for i=1 to rspagecount
responsewrite "<a href='tiaozhuanaspact=ok&page="&i&"'>"&i&"</a>|"
next
%></p>
<%
for i = 1 to rspagesize
if rseof then exit for
%>
<p align="letf">姓名:<%=rs("name")%> 地址:<%=rs("address")%> QQ:<%=rs("qq")%> 留言内容:<%=rs("content")%></p>
<% rsmovenext
next
%>
<%
else
%><p align="center">暂时没有留言</p>
<%
end if
set rs = nothing
connclose
set conn = nothing
end if
%>
</td>
</tr>
</table>
</body>
</html>
以上就是关于数据库刷两个表数据的脚本全部的内容,包括:数据库刷两个表数据的脚本、自己写的ASP 留言版程序,F5刷新老是写空数据库,将数据写空,对高手来说很简单把代码贴出望高手看一下.、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)