數據庫調出顯示爲下拉列表

<!--#include file=conn.asp-->
<title>數據庫調出顯示爲下拉列表:</title>
</head>
<body>
 
<table bgcolor="#FFFF00" width="90%" >
 
<tr>
 
<td width="150">數據庫調出</td>
<td width="250"><select name="table" >
<%
set rs = createobject("ADODB.recordset")
sql
="select * from ZhiFa where type like '"&trim(request.QueryString("type"))&"__moban'"
'sql="select * from ZhiFa where type like '"&trim(request.QueryString("type"))&"_"&"_moban'"
rs.open SQL,conn,3,1
while not rs.eof
%
>
<option value="<%=rs("table")%>"><%=rs("table")%></option>
<%
rs.movenext
wend
rs.close
%
>
</select>
</td>
</tr>
</table>
</body>
</html>
 一定要先連接數據庫
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章