Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
MySQL Query
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Gajeel" data-source="post: 100954" data-attributes="member: 7688"><p>[PHP]<?php</p><p> $GetRanks = mysql_query("SELECT id,name FROM ranks WHERE id < 5 ORDER BY id DESC");</p><p> while($Ranks = mysql_fetch_assoc($GetRanks))</p><p> {</p><p> echo "<div class=\"habblet-container \"><div class=\"cbb clearfix blue \"><h2 class=\"title\">{$Ranks['name']}s</h2><div style=\"padding:5px\"><p>";</p><p> $GetUsers = mysql_query("SELECT username,motto,rank,last_online,online,look FROM users WHERE rank = {$Ranks['id']}");</p><p> while($Users = mysql_fetch_assoc($GetUsers))</p><p> {</p><p> if($Users['online'] == 1){ $OnlineStatus = "<font color=\"darkgreen\"><b>Online</b></font>"; } else { $OnlineStatus = "<font color=\"darkred\"><b>Offline</b></font>"; }</p><p> echo "<img style=\"position:absolute;\" src=\"http://www.habbo.com/habbo-imaging/avatarimage?figure={$Users['look']}&action=wav&direction=2&head_direction=3&gesture=srp&size=l\">"</p><p> ."<p style=\"margin-left:80px;margin-top:20px;\">Username: <strong>{$Users['username']}</strong><br>Motto: <strong>{$Users['motto']}</strong><br><small>Last Online: ". date("D, d F Y H:i (P)", $Users['last_online']) ."</small></p>"</p><p> ."<p style=\"float:right;margin-top:-30px;margin-right:5px;\">{$OnlineStatus}</p><br><br><br>";</p><p> }</p><p> echo "</div></div></div>";</p><p> }</p><p> ?>[/PHP]</p><p> </p><p>That is the PHP code for the staff page @ Habbo Theme. How can I tell it to fetch id and name from ranks 4 and below, except 1? I am re-doing the staff page to turn it out as a VIP page, as there will be 3 levels of VIP and they are partitioned through ranks.</p></blockquote><p></p>
[QUOTE="Gajeel, post: 100954, member: 7688"] [PHP]<?php $GetRanks = mysql_query("SELECT id,name FROM ranks WHERE id < 5 ORDER BY id DESC"); while($Ranks = mysql_fetch_assoc($GetRanks)) { echo "<div class=\"habblet-container \"><div class=\"cbb clearfix blue \"><h2 class=\"title\">{$Ranks['name']}s</h2><div style=\"padding:5px\"><p>"; $GetUsers = mysql_query("SELECT username,motto,rank,last_online,online,look FROM users WHERE rank = {$Ranks['id']}"); while($Users = mysql_fetch_assoc($GetUsers)) { if($Users['online'] == 1){ $OnlineStatus = "<font color=\"darkgreen\"><b>Online</b></font>"; } else { $OnlineStatus = "<font color=\"darkred\"><b>Offline</b></font>"; } echo "<img style=\"position:absolute;\" src=\"http://www.habbo.com/habbo-imaging/avatarimage?figure={$Users['look']}&action=wav&direction=2&head_direction=3&gesture=srp&size=l\">" ."<p style=\"margin-left:80px;margin-top:20px;\">Username: <strong>{$Users['username']}</strong><br>Motto: <strong>{$Users['motto']}</strong><br><small>Last Online: ". date("D, d F Y H:i (P)", $Users['last_online']) ."</small></p>" ."<p style=\"float:right;margin-top:-30px;margin-right:5px;\">{$OnlineStatus}</p><br><br><br>"; } echo "</div></div></div>"; } ?>[/PHP] That is the PHP code for the staff page @ Habbo Theme. How can I tell it to fetch id and name from ranks 4 and below, except 1? I am re-doing the staff page to turn it out as a VIP page, as there will be 3 levels of VIP and they are partitioned through ranks. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
MySQL Query
Top