| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2177 人关注过本帖
标题:无法读出数据 看看!!!
只看楼主 加入收藏
loveyyy
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2014-10-30
结帖率:0
收藏
已结贴  问题点数:20 回复次数:5 
无法读出数据 看看!!!
<%
strconnection="driver={mysql odbc 3.51 driver};database=jtwgamedb;server=localhost;uid=root;password=
set adodataconn = server.createobject("adodb.connection")
adodataconn.open strconnection
strquery = "select * from playerattrib order by level desc"
set rs = adodataconn.execute(strquery)
if not rs.bof then
%>

<html dir=ltr>
<head>
    <title>练级狂人榜</title>
    <META NAME="ROBOTS" CONTENT="NOINDEX">
    <META HTTP-EQUIV="Content-Type" content="text/html; charset=gb2312">
    <META NAME="MS.LOCALE" CONTENT="ZH-CN">
</head>
<body bgcolor="#99CCFF" text="#000000">
 
<strong><font size="5" face="楷体_GB2312"><p align="center" /p>练级狂人榜TOP50</font></strong>
 
 
    <TABLE COLSPAN=8 CELLPADDING=2 align=center BORDER=0 bordercolorlight="#000000" cellspacing="1">
    <!-- BEGIN 列标题行 -->
        <TR>
        <TD ALIGN=left  BGCOLOR="#66CCFF">
            <p align="center">
            <FONT STYLE="ARIAL NARROW" SIZE=2>排名</FONT>
        </TD>
        <TD ALIGN=CENTER BGCOLOR="#66CCFF">
            <font size="2">玩家</font>
        </TD>
        <TD ALIGN=left  BGCOLOR="#66CCFF">
            <p align="center">
            <FONT STYLE="ARIAL NARROW" SIZE=2>ID</FONT>
        </TD>
        <TD ALIGN=CENTER BGCOLOR="#66CCFF">
            <FONT STYLE="ARIAL NARROW" SIZE=2>角色</FONT>
        </TD>
        <TD ALIGN=CENTER BGCOLOR="#66CCFF">
            <font size="2">等级/轮回</font>
        </TD>
        <TD ALIGN=CENTER BGCOLOR="#66CCFF">
            <font size="2">地图</font>
        </TD>
        </TR>
<%
i=0
do while not rs.eof
i=i+1

if rs("attribute")=2 then
shuxing="唐僧"
end if
if rs("attribute")=5 then
shuxing="八戒"
end if
if rs("attribute")=4 then
shuxing="猴子"
end if
if rs("attribute")=3 then
shuxing="沙僧"
end if
if rs("attribute")=1 then
shuxing="龙女"
end if


if rs("mapno")=1 then
maphere="五行山"
end if
if rs("mapno")=2 then
maphere="白骨山"
end if
if rs("mapno")=3 then
maphere="白骨洞"
end if
if rs("mapno")=4 then
maphere="白骨小洞"
end if
if rs("mapno")=5 then
maphere="号山"
end if
if rs("mapno")=6 then
maphere="莲花洞"
end if
if rs("mapno")=7 then
maphere="莲花小洞"
end if
if rs("mapno")=8 then
maphere="松花间"
end if
if rs("mapno")=9 then
maphere="火云洞"
end if
if rs("mapno")=10 then
maphere="车迟国"
end if
if rs("mapno")=11 then
maphere="三清观"
end if
if rs("mapno")=12 then
maphere="三清观1"
end if
if rs("mapno")=13 then
maphere="三清观2"
end if
if rs("mapno")=14 then
maphere="陈家庄"
end if
if rs("mapno")=15 then
maphere="冰河"
end if
if rs("mapno")=16 then
maphere="通天河"
end if
if rs("mapno")=17 then
maphere="通天河2"
end if
if rs("mapno")=18 then
maphere="花果山"
end if
if rs("mapno")=19 then
maphere="水帘洞"
end if
if rs("mapno")=20 then
maphere="水帘洞小洞"
end if
if rs("mapno")=21 then
maphere="火焰山1"
end if
if rs("mapno")=22 then
maphere="火焰山2"
end if
if rs("mapno")=23 then
maphere="芭蕉洞"
end if
if rs("mapno")=24 then
maphere="芭蕉小洞"
end if
if rs("mapno")=25 then
maphere="小雷音寺"
end if
if rs("mapno")=26 then
maphere="火枫林"
end if
if rs("mapno")=27 then
maphere="长安"
end if
if rs("mapno")=28 then
maphere="荣誉堂1"
end if
if rs("mapno")=29 then
maphere="荣誉堂2"
end if
%>
        <TR>
        <TD ALIGN=CENTER BGCOLOR="#f7efde">
            <font size="2"><%=i%></font>
        </TD>
        <TD ALIGN=CENTER BGCOLOR="#f7efde">
            <font size="2"><%=rs("name")%></font>
        </TD>
        <TD ALIGN=left  BGCOLOR="#f7efde">
            <p align="center">
            <FONT STYLE="ARIAL NARROW" SIZE=2><%=rs("icq")%></FONT>
        </TD>
        <TD ALIGN=CENTER BGCOLOR="#f7efde">
            <FONT STYLE="ARIAL NARROW" SIZE=2><%=shuxing%></FONT>
        </TD>
        <TD ALIGN=CENTER BGCOLOR="#f7efde">
            <font size="2"><%=rs("level")%></font>
        </TD>
        <TD ALIGN=CENTER BGCOLOR="#f7efde">
            <font size="2"><%=maphere%></font>
        </TD>
        </TR>
<%
if i>=50 then exit do
rs.movenext
loop
%>
</table>
<%
else
response.write("未找到数据.")
end if
rs.close
adodataconn.close
set adodataconn = nothing
set rsemaildata = nothing
%>
搜索更多相关主题的帖子: localhost database content server mysql 
2014-10-30 13:14
loveyyy
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2014-10-30
收藏
得分:0 
要做个 网页能显示排行榜的  各位老师 看看 上面有什么问题
2014-10-30 13:16
loveyyy
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2014-10-30
收藏
得分:0 
Navicat_MySQL_cs 8.0
mysql-connector-odbc 3.51
winmysqladmin  
软件 启动 都正常  求指点 谢谢 !!!
2014-10-30 13:20
hu9jj
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:红土地
等 级:贵宾
威 望:400
帖 子:11771
专家分:43421
注 册:2006-5-13
收藏
得分:7 
你的rs.open语句在哪?

活到老,学到老!http://www.(该域名已经被ISP盗卖了)E-mail:hu-jj@
2014-10-31 19:28
tlliqi
Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19
等 级:贵宾
威 望:204
帖 子:15453
专家分:65956
注 册:2006-4-27
收藏
得分:7 
回复 4 楼 hu9jj
可能忘了
2014-11-01 18:30
ysf0181
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:55
帖 子:914
专家分:2385
注 册:2006-10-4
收藏
得分:7 
无法读数据,很多种情况。
1、权限。
2、对象代码有无正确。(你用 response.end,一步一步检查代码执行过程)
3、有无数据。

ASP讨论QQ群:251346273
2014-11-03 08:53
快速回复:无法读出数据 看看!!!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016708 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved