1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Count Mysql

Discussion in 'Skript' started by Spartan9802, Apr 28, 2017.

Tags:
Thread Status:
Not open for further replies.
  1. Spartan9802

    Spartan9802 Member

    Joined:
    Jan 26, 2017
    Messages:
    158
    Likes Received:
    8
    Good evening,
    How do I count the number of players with the same value in a mysql database?
    Thanks for your help :emoji_wink:
     
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Could you elaborate a bit of what are you talking about? I didn't understand at all.
     
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Solved ^^

    Code (Skript):
    1. set {_result} to result of query "SELECT COUNT(`Player`) From KeyList WHERE `Player` = '%{_player}%'"
    2.     set {_count} to the first element out of objects in column "COUNT(`Player`)" from {_result}
    3.    
    4.     return {_count}
     
Thread Status:
Not open for further replies.

Share This Page

Loading...