时间: 2021-07-31 作者:daque
<!--#include file="conn.asp" --><html><head><title>untitled document</title><meta http-equiv="content-type" content="text/html; charset=utf8"></head><body><%dim rs,sql,rsnameset rs=server.createobject("adodb.recordset") on error resume next sql="select * from your_table"rs.open sql, connrsname=rs( 0 ).namefor i = 1 to rs.fields.count - 1 'rsname=rsname&chr(9)&rs( i ).namersname=rsname&","&rs( i ).namenext rsname=rsname&chr(13)rs.closeset rs=nothingconn.closeset conn=nothingfunction e(w)dim hdim my_array,my_array1my_array=split(w,",")my_array1=split(w,",")dim ifor i=0 to ubound(my_array)my_array(i)=my_array(i)&"="&chr(39)&chr(34)&chr(38)&my_array(i)&chr(38)&chr(34)&chr(39)nextfor i=0 to ubound(my_array)my_array1(i)=chr(39)&chr(34)&chr(38)&my_array1(i)&chr(38)&chr(34)&chr(39)nexte="<p>"&w&"<p>"&"update:"&"<br>"&"update your_table set "& join(my_array,",")&"where 前提"&"<p>"&"insert:"&"<br>"&"insert into your_table ("&w&")values("&join(my_array1,",")&")"end functionresponse.write e(rsname)%></body></html>