首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

读取数据id=conn.execute("select id from table where id2=1")(0)解决方法

2012-02-11 
读取数据idconn.execute(select id from table where id21)(0)如,在ASP里%idconn.execute( selecti

读取数据id=conn.execute("select id from table where id2=1")(0)
如,
在ASP   里
<%id=conn.execute( "select   id   from   table   where   id2=1 ")(0)
读一个数据这样写。那要读出两个字段要怎么写?


id=conn.execute( "select   id   from   table   where   id2=1 ")(0)
这个   ...???=conn.execute( "select   id,name   from   table   where   id2=1 ")   ???


理解我的意思吗??
%>

[解决办法]
sql= "select id ,name from table where id2=1 "
rs.open sql,conn,1,3
id=rs(0),name=rs(1)
具体自己测试看

[解决办法]
id=conn.execute( "select id,name from table where id2=1 ")

a=id(0,0)
b=id(0,1)

未测试,不知道是不是```

热点排行