Hiding Rank 8

Status
Not open for further replies.

Wolverine

Member
Aug 1, 2014
87
3
I want to create a 'hidden' table under 'users' where on the staff page, it wont display that user on the staff page but they'll still be rank 8. Possible?

Staff.php:
 

JayC

Always Learning
Aug 8, 2013
5,494
1,398
Code:
$GetUsers = mysql_query("SELECT username,motto,rank,last_online,online,look FROM users WHERE rank = {$Ranks['id']} ORDER by id");

Add a column in the users table called "staff_hide" and make it an int length 11 , 0 (Alternatively, use an ENUM variable if you only want 1 and 0)

then just change the top code to this:
Code:
$GetUsers = mysql_query("SELECT username,motto,rank,last_online,online,look FROM users WHERE rank = {$Ranks['id']} AND staff_hide = '0' ORDER by id");

Set staff_hide to 1 to hide them from the page.
 

Ecko

23:37 [autobots] -!- eckostylez [[email protected]]
Nov 25, 2012
1,396
960
Code:
$GetUsers = mysql_query("SELECT username,motto,rank,last_online,online,look FROM users WHERE rank = {$Ranks['id']} ORDER by id");

Add a column in the users table called "staff_hide" and make it an int length 11 , 0 (Alternatively, use an ENUM variable if you only want 1 and 0)

then just change the top code to this:
Code:
$GetUsers = mysql_query("SELECT username,motto,rank,last_online,online,look FROM users WHERE rank = {$Ranks['id']} AND staff_hide = '0' ORDER by id");

Set staff_hide to 1 to hide them from the page.
wtf that's so excessive, just change this query:
Code:
$GetRanks = mysql_query("SELECT id,name,tab_colour,title FROM ranks WHERE id > 1 ORDER BY id DESC");
to
Code:
$GetRanks = mysql_query("SELECT id,name,tab_colour,title FROM ranks WHERE id > '1' AND id < '8' ORDER BY id DESC");
 
Status
Not open for further replies.

Users who are viewing this thread

Top