主题:实现这样的功能能实现吗
<%
set myrec=server.CreateObject("adodb.recordset")
myrec.open "设备厂家表",myconn ,1,1
response.Write "<select name='changjia'>"
do while not myrec.eof
response.Write "<option>"&myrec("设备厂家")&"</option>"
myrec.movenext
loop
response.Write "</select>"
myrec.close
%>
</td>
<td>
<% mysql="select 产品名称 from 设备表 where 产品编号=(select 厂家编号 from 设备厂家表 where 设备厂家='BTS'"
myrec.open mysql,myconn ,1,1
response.Write "<select>"
do while not myrec.eof
response.Write "<option>"&myrec("产品名称")&"</option>"
myrec.movenext
loop
response.Write "</select>"
%></td>
</table>
问题:如何将下面的mysql语句中最后那个‘BTS’改成一变量,
使它是上面一段代码的结果,我的预想是改变上面的值,下面的myrec("产品名称")跟着变!求教各位大虾了
set myrec=server.CreateObject("adodb.recordset")
myrec.open "设备厂家表",myconn ,1,1
response.Write "<select name='changjia'>"
do while not myrec.eof
response.Write "<option>"&myrec("设备厂家")&"</option>"
myrec.movenext
loop
response.Write "</select>"
myrec.close
%>
</td>
<td>
<% mysql="select 产品名称 from 设备表 where 产品编号=(select 厂家编号 from 设备厂家表 where 设备厂家='BTS'"
myrec.open mysql,myconn ,1,1
response.Write "<select>"
do while not myrec.eof
response.Write "<option>"&myrec("产品名称")&"</option>"
myrec.movenext
loop
response.Write "</select>"
%></td>
</table>
问题:如何将下面的mysql语句中最后那个‘BTS’改成一变量,
使它是上面一段代码的结果,我的预想是改变上面的值,下面的myrec("产品名称")跟着变!求教各位大虾了