#how to get info out of database?

1 messages · Page 1 of 1 (latest)

balmy jetty
#

i am trying to get the info of a plot out of my database

1 = plotname
2 = plot price
3 = if plots for sale

execute "SELECT price FROM table" in {-sql} and store the result in {plots::price}

is what i am trying to use as code but doesnt work? what am i doing wrong.

plugin for db: skript-db

balmy jetty
#

?

dark slate
#

store the result in a list

#

can't store multiple values in a single variable

balmy jetty
#

No but I just one of the 3

#

So I don’t need to make a list

#

I want a var for price and one for status

dark slate
#

still can't set a single value to multiple values

#

store it in a list

#

use the list to find what you want

balmy jetty
#

owhh so i need to import the table and then make it a list and import the sinlge price as a variable from the list?

dark slate
#

pretty much

balmy jetty
#

do you have a example or something? because i would haven o idea how i would need to do that

slender turtle
#

you set it to {plots::price}, so set it to something like {plots::prices::*} instead

balmy jetty
#

but "SELECT price FROM table" price is that how the rule in my database need to be named or the variable in my database?

dark slate
#

select price from table and store result in {_result::*} -> {_result::price::*} contains information

balmy jetty
#

but how does i know what to take from the table?

#

or

#

do i need to change table to the table name?