程序员的出路

alex.w的Blog

导航

统计用户注册资料完整度的方法

Posted on 2008-11-18 11:16  alex.w  阅读(314)  评论(0)    收藏  举报
set Rs=server.CreateObject("Adodb.Recordset")
sql = "select * from love_user where User_id=2120"
Rs.open sql,conn,1,1
total=rs.fields.count
num=0
for i=0 to rs.fields.count-1
if rs(i)<>"" then
num=num+1
end if
next
Response.Write(int(num/total*100))