Jump to content

How not to display admin when fetching data from mysql user table


malkocoglu

Recommended Posts

Dear users,

 

I am trying to disregard ADMIN when displaying registered users from USERS table.

 

The code I am using is

if($session->isAdmin()) {$query="SELECT username FROM users ";}

This gives me all the users from the database. What I want to do is not to display ADMIn and display the rest of the users.

 

is it possible? Could anyone help?

Thanks for quick replies. Could you possible wrote the code where it excludes the ADMIN?

 

No, because we have no idea what you may, or may not, have in your database to identify what an ADMIN is.

 

Do you have a column called "admin" with a 0/1 value?

 

SELECT username FROM users WHERE admin = 0

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.