注册 登录
编程论坛 ASP技术论坛

select怎样 将两个数据分别写入两个字段.

lecojason 发布于 2007-09-13 14:38, 537 次点击
<select name="pxid">
<%dim nrs
set nrs=server.createobject("adodb.recordset")
nrs.open"select * from news_class",dbconn,1,1
do while not nrs.eof
%>
<option selected value="<%=nrs("pxid")%>"><%=nrs("classname")%></option>
<%nrs.movenext
loop
nrs.close
set nrs=nothing%></select>

我现在只能把PXID写入数据库pxid字段。想把classname写入classname字段。请问怎么才能实现??

2 回复
#2
purana2007-09-13 14:42
insert into news_class(pxid,classname) values(xxx,xxx)
#3
lecojason2007-09-13 15:11

不是这个意思呢.
我要写如另外一个叫NEWS的表中,那个表中有classid和classname字段.上面的代码只是其中一部分...另外还有title.hits.url.from.....等字段.怎么在select 里面读取到classname的值.并通过语句写入数据库

1