我查看了很多很多关于如何在结果超过后制作编号导航链接的指南,比如说 25 个结果,所以 url 栏会有一个类似的 url ./index.php?page=3,并且找不到容易的东西根据我的代码实现:
<body>
<div id = 'scoreboardcontainer'>
<?php
$ranking = mysql_query("SELECT username, points\n"
. "FROM sector0_players\n"
. "WHERE points = (SELECT MAX(points) FROM sector0_players WHERE points< (SELECT MAX(points) FROM sector0_players WHERE points <(SELECT MAX(points) FROM sector0_players)))");
?>
<ul>
<li><a href="#scoreboard" title = "Point scoreboards">Scoreboards</a></li>
<li><a href="#Tour_boards" title = "Tournament socreboards" class = "tbr">Tournament</a></li>
</ul>
<div id="scoreboard">
<div class = "scoreboardtitles">
<div class = "player_score_rankinfl2">Rank</div>
<div class = "player_score_usnamefl2">Username</div>
<div class = "player_score_charnamefl2">Character</div>
<div class = "player_score_pointfl2">Points</div>
</div>
<br />
<hr />
<?php
$scoreboardquery = mysql_query("SELECT * FROM sector0_players ORDER BY points DESC");
while($scoreboard_fetch = mysql_fetch_array($scoreboardquery)){
?>
<div class="global_container_score_class"> <!--Start generating from here-->
<div class = "scoreboard_1l">
<div class = "player_rank">1st</div>
<div class = "player_name"><a href = "profile.php?id=<?php echo $scoreboard_fetch['id'];?>"><?php echo $scbdname = $scoreboard_fetch['username'];?></a></div>
</div>
<div class = "scoreboard_2r">
<div class = "player_charname"><?php echo $scbddspname = $scoreboard_fetch['displayname'];?></div>
<div class = "player_points"><?php echo $scbdpoints = number_format($scoreboard_fetch['points']);?></div>
</div>
<div class = "clear"></div>
</div>
<?php
}
?>
</div>
我在 OOP 方面没有经验,我知道如何对其进行编程,但不会对其进行修改以满足我的需要。如果这种情况需要 OOP,如果有人能为我提供学习高级 OO 的良好开端,我将不胜感激。如果没有,只需输入我需要实现的内容(除非必要,否则不需要代码)。