Solved [MYSQL] Selecting and returning a value from a column.

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

lucasmooon

Member
Feb 4, 2017
16
0
0
23
Solved.

Good evening.

I'm trying to return a value from a column, but all I get is the name of the column.

What I want to do is: I have a database called api, with the table players with a column call "logged". It will be a boolean, true/false. This is a way I can check if the player is logged on the server or not.

c87c55d2ed.png


The code is:

code_language.skript:
on load:
    set {sql} to the database "mysql:.."
  
command /dbtest:
    trigger:
        execute "SELECT logado FROM jogadores" in {sql} and store the result in {_output::*}
        broadcast "%{_output::*}%"

Is there anything I'm not getting right?

Skript version: 2.2
Using skript-db

Thank you.
 
Status
Not open for further replies.