skript-db (Updated)

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

Govindas

Active Member
Feb 5, 2017
82
5
8
Code:
Awesome direct database access for Skript
What makes skript-db different from other SQL addons?
  • Automatic SQL injection protection
  • Support for connections to multiple databases
  • An amazingly intuitive list variable system for reading query outputs
This is a fork of btk5h's skript-db, with these changes:
  • Fixed local variables disappearance in newer Skript versions
  • Thread-pool size is now configurable
  • Uses a newer version of HikariCP
  • Only meant to be used by newer Minecraft versions (1.8 is not supported)
Documentation/Source - Releases

Quickstart
Code:
on script load:
  set {-sql} to the database "mysql://localhost:3306/mydatabase?user=admin&password=12345&useSSL=false"

Code:
command /dbtest:
  trigger:
    execute "select * from table" in {-sql} and store the result in {_output::*}
    send "First entry in column: %{_output::columnname::1}%"
 
execute "UPDATE `stat` SET `%loop-value%` = %{stat.%loop-value%.%player's name%}% WHERE `stat`.`VarName` = %player's name%" in {sql}

It's not error,but it can't update the datebase and no any effect
[doublepost=1630582596,1630582382][/doublepost]
execute "UPDATE `stat` SET `%loop-value%` = %{stat.%loop-value%.%player's name%}% WHERE `stat`.`VarName` = %player's name%" in {sql}

It's not error,but it can't update the datebase and no any effect
execute "UPDATE `stat` SET `health` = %{_text}% WHERE `stat`.`VarName` = %arg-1%" in {sql}
However, this is the test I wrote before. It can update the database
 
Hello, I can't register on your git. I just don't get an email.
I've been using the addon for quite some time along with postgreSQL.
To do this, I just added the driver directly to the plugin jar.
config.yaml
Code:
sql-driver-class-name: "org.postgresql.Driver"
It works without any problem. For months of use, bugs have not been noticed.