Solved Skript-db Help

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

AsuDev

VIP
Jan 27, 2017
241
22
18
24
United States
Latest bensku
spigot 1.12.2
skript-db

I am new to skript-db and I was wondering if I was doing this right because it seems like I am not...

So I have this:

execute "SELECT * FROM playerdata" in {_sql} and store the result in {_results::*}
broadcast "%last data source error%" #No Errors at all, just for testing if it failed to connect to db
broadcast "%{_results::*}%"

The array {_results::*} is returning "Name" and "UUID" but not the stuff underneath it... How do I get the values underneath? Here is a pic of the result grid:

https://ibb.co/cLpFaH
 
all the uuids would be under {_results::uuid::*} and all the names under {_results::name::*}

if you wanted to get the data of a specific uuid you would do:
execute "SELECT * FROM playerdata where uuid=%player's uuid%" in {_sql} and store the result in {_playerinfo::*}

and the the variable {_playerinfo::name::*} would give you their name
 
Status
Not open for further replies.