当前位置: 移动技术网 > IT编程>开发语言>其他编程 > 如何利用数据库内容建立一个下拉式列表?

如何利用数据库内容建立一个下拉式列表?

2017年12月08日  | 移动技术网IT编程  | 我要评论

如何利用数据库内容建立一个下拉式列表?

<% mydsn="dsn=xur;uid=xur;pwd=xur"
mysql="select * from authors where au_id<100"
set conntemp=server.createobject("adodb.connection")
conntemp.open mydsn
set rstemp=conntemp.execute(mysql)
if rstemp.eof then
response.write "
,数据库为空!"
response.write mysql
conntemp.close
set conntemp=nothing
response.end
 end if%>
<%do until rstemp.eof %>
<%
rstemp.movenext
loop
rstemp.close
set rstemp=nothing
conntemp.close
set conntemp=nothing

' 清空对象
%>

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网