sql查询记录建立ASP数组 ASP怎么把字符串转换为数组形式

2025-04-27 08:47:16

sql查询记录建立ASP数组

<script type="text/javascript">

var arr1=new array();

<%

sql = "select answer from question where tixingid = 3"

set rs = server.CreateObject("adodb.recordset")

rs.open sql,connbbs,1,1

Dim a() '定义a数组

Dim l

l = 0

While Not Rs.EOF

%>

arr1 =<%= Rs("answer")%> //保存新数据

<%

Rs.MoveNext

Wend

rs.close

set rs = nothing

%>

</script>

ASP怎么把字符串转换为数组形式

<% dim s,t,i s="peng" redim t(len(s)-1) for i=1 to len(s) t(i-1)=mid(s,i,1) next '测试结果 for i=0 to ubound(t) response.write t(i) & "<br>" next %>

js与asp结合,嵌套循环填充数组,求高手帮忙

concat()连接两个或更多的数组,并返回结果。

join()把数组的所有元素放入一个字符串。元素通过指定的分隔符进行分隔。

pop()删除并返回数组的最后一个元素

push()向数组的末尾添加一个或更多元素,并返回新的长度。

reverse()颠倒数组中元素的顺序。

shift()删除并返回数组的第一个元素。

slice()从某个已有的数组返回选定的元素等等。

求:ASPsql查询按数组值查询修改怎么写代码

select 字段,(case bh when 'bh001' then ys+1when 'bh002' then ys+3when 'bh003' then ys+5 else '' end)newcol from 表

友情链接: base64 分词 迷你小数字