RevCMS Scripts

Detox

Member
Jul 24, 2010
365
24
So I'm trying to get this still to make it when the staff is online. so basically online = 1

PHP:
<?php  
$getStaff = mysql_query("SELECT * FROM users WHERE rank <=5");  
$staffs = mysql_num_rows($getStaff);  
?>
There are <strong><?php echo $staffs; ?></strong> Staff Members on {hotelname}.<br />

And when newest users is created it always shows up as me (rank 10)

PHP:
<?php 
                                $getUserInfo = mysql_query("SELECT username,online,motto,account_created,look FROM users WHERE account_created ORDER BY username LIMIT 1");
                                while ($userInfo= mysql_fetch_assoc($getUserInfo))
                                     {
                                echo '
 

ItsNick

Member
Nov 19, 2013
96
15
Pretty simple.. And you can even order it by who was online last.
PHP:
$getStaff = mysql_query("SELECT * FROM users WHERE rank <=5 AND online = 1 ORDER BY last_online DESC LIMIT 1");

For your newest users...

PHP:
$getUserInfo = mysql_query("SELECT * FROM users  ORDER BY account_created DESC LIMIT 1");
 

Users who are viewing this thread

Top