当前位置: 代码迷 >> ASP >> 高手帮个忙,数组操作数据库的有关问题,
  详细解决方案

高手帮个忙,数组操作数据库的有关问题,

热度:44   发布时间:2012-04-08 14:38:30.0
高手帮个忙,数组操作数据库的问题,在线等~~
<table>
<%
toname   =   split(session( "padname "), ", ")
for   i=0   to     ubound(toname)  
set   rsp   =   server.CreateObject( "adodb.recordset ")
sqlp   =   "select   mbno   from   oa_user   where     name= ' "&toname(i)& " ' "
rsp.open   sqlp,conn,1,1
%>
    <tr>
        <td   > <%=toname(i)%> <%=rsp( "mbno ")%> </td>
    </tr>
    <%   next   %>
</table>
---------------------------------------------------
运行以后为什么rsp( "mbno ")只能取到第一即toname(0)时的数据阿?其他都是空的。。

------解决方案--------------------
sqlp = "select mbno from oa_user where name= ' "& trim(toname(i)) & " ' "
  相关解决方案