Last active
December 5, 2017 06:10
-
-
Save wokka1/b83a1494d5dc466d96bde204d5e4dad4 to your computer and use it in GitHub Desktop.
skript-db errors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on load: | |
# | |
# Dependent on skript-db plugin | |
# | |
set {sql} to the database "mysql://localhost:3306/dbname?user=dbuser&password=dbpw&useSSL=false" | |
#table_index | |
#id, table num, table name, name of bot | |
execute "CREATE TABLE IF NOT EXISTS table_index (id INT NOT NULL AUTO_INCREMENT, table_num INT, table_name VARCHAR(50), table_botname VARCHAR(50), PRIMARY KEY(id));" in {sql} and store the result in {output::*} | |
#table_player | |
#id, player, table num, table state | |
execute "CREATE TABLE IF NOT EXISTS table_player (id INT NOT NULL AUTO_INCREMENT, table_playername VARCHAR(50), table_player_num INT, table_player_state VARCHAR(50), PRIMARY KEY(id));" in {sql} and store the result in {output::*} | |
command /testdb: | |
permission: group.admin | |
trigger: | |
execute "select table_player_num from table_player where table_playername = '%{player}%';" in {sql} and store the result in {_test} | |
set {_last_error} to the last sql error | |
send "player: %player% - table num : %{_test}%" | |
send "error: %{_last_error}%" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment