MySQL Selecting Users with a value

Results 1 to 2 of 2
  1. #1
    Account Upgraded | Title Enabled! matthieu503 is offline
    MemberRank
    Jul 2011 Join Date
    357Posts

    MySQL Selecting Users with a value

    Here is a mysql command to find out who is a GM on your server.
    You probably already know the command though. xD

    PHP Code:
    SELECT name
    FROM 
    `characters`
    WHERE gm 
    You can obviously change it around to suit your needs

    PHP Code:
    SELECT name
    FROM 
    `characters`
    WHERE gm 
    That would make it so it selects all characters with the GM Level of 1. (Change characters to accounts if you want.)

    PHP Code:
    SELECT `level`, `name`, `str`, `dex`, `luk`, `int`
    FROM `characters`
    WHERE level 200 
    This would make it find all the level 200's along with the stats of them.

    PHP Code:
    SELECT `name`, `banned`
    FROM `accounts`
    WHERE banned 
    Lists the banned people from the server.

    If you need the codes for listing any others, just post here and i'll try an reply asap.
    PS: Instead of making it three lined, you can merge it to one line (Ex: SELECT name FROM `characters` WHERE gm > 0)
    Last edited by matthieu503; 24-07-12 at 05:55 AM.


  2. #2
    very green greenelfx is offline
    MemberRank
    Jul 2011 Join Date
    1,323Posts

    Re: MySQL Selecting Users with a value

    It would be much easier to link to a very simple mySQL tutorial...



Advertisement