skript-db help #27

Closed
opened 2024-05-23 00:01:28 +00:00 by Enablement · 1 comment

hi,

so basically do this and it does display heads of the user opening the gui with the names of the columns of the database:

create a gui with virtual chest inventory with 6 rows named "&6ᴛᴏᴘ ᴢᴏɪɴ ᴄᴏɪɴꜱ": set {_slot} to 0 execute "SELECT * FROM Users" in {-sql} and store the result in {_output::*} loop {_output::*}: make gui slot {_slot} with skull of player named loop-value: play sound "ui.button.click" at volume 1 at pitch 10 to player add 1 to {_slot}

(shown in image)

but when i change the code to SELECT name FROM Users all it gives me is one skull named name which is the column name?

does anyone know what this could be?

hi, so basically do this and it does display heads of the user opening the gui with the names of the columns of the database: ` create a gui with virtual chest inventory with 6 rows named "&6ᴛᴏᴘ ᴢᴏɪɴ ᴄᴏɪɴꜱ": set {_slot} to 0 execute "SELECT * FROM Users" in {-sql} and store the result in {_output::*} loop {_output::*}: make gui slot {_slot} with skull of player named loop-value: play sound "ui.button.click" at volume 1 at pitch 10 to player add 1 to {_slot} ` (shown in image) but when i change the code to SELECT name FROM Users all it gives me is one skull named name which is the column name? does anyone know what this could be?
Owner

hello, please pay attention to examples on the front page, the variable is: {_output::name::1}, so you get 'name' because you loop {_output::*}, but you should be looping {_output::name::*}

hello, please pay attention to examples on the front page, the variable is: `{_output::name::1}`, so you get 'name' because you loop `{_output::*}`, but you should be looping `{_output::name::*}`
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Limework/skript-db#27
No description provided.