Problems with variables in sql query

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

    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.

Champennn

Member
Apr 17, 2023
1
0
1
Hi!

This is my testing code, where i'm trying to understand what is going on.
Code:
command /test:
    trigger:
       
        #Database Variables
        set {_sqlConnection} to yaml value "mc250391" from file "plugins/Yaml/MySQL/database.yml"
        set {_sql} to the database "%{_sqlConnection}%"
       
        set {_column} to "kills"
        execute "SELECT * FROM stats ORDER BY %{_column}% DESC LIMIT 1 OFFSET 0" in {_sql} and store the output in {_top1::*}
        message "First Call: %{_top1::uuid::*}%"

        execute "SELECT * FROM stats ORDER BY kills DESC LIMIT 1 OFFSET 0" in {_sql} and store the output in {_top2::*}
        message "Second Call: %{_top2::uuid::*}%"

The result of the code:
upload_2023-4-17_16-6-9.png


In my opinion it should return the same, but it dosen't..
Do anyone know if this is a general issue or i'm doing something wrong.

Best Regards
 
Status
Not open for further replies.