Chinaunix首页 | 论坛 | 博客
  • 博客访问: 26277514
  • 博文数量: 2065
  • 博客积分: 10377
  • 博客等级: 上将
  • 技术积分: 21525
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-04 17:50
文章分类

全部博文(2065)

文章存档

2012年(2)

2011年(19)

2010年(1160)

2009年(969)

2008年(153)

分类: 系统运维

2008-12-09 15:28:53

1.查询出来并选择某字段的值
sql="select * from admin"
set rs = conn.execute(sql) '直接得到一个集合数据类型
do while not  rs.eof
  response.Write(rs("username"))
  rs.movenext
loop
rs.close
set rs=nothing
2.JSP中的更新语句
newpass = "an"
sql="update admin set password='"&newpass&"' where username='admin'"
response.Write(sql)
conn.execute(sql)
在JSP中的SQL语句是这样来写的哦:+ASP中我们是用&来处理的哦!
太简单了吧!
3.后台获取到提交的参数值
r_id=request("id")
<%=content%>
类似于JSP中的<%= Variable%>

阅读(864) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~