Solved MySql question, how to

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

    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.

FilipeNock

Member
Jan 26, 2017
77
7
3
Brazil
www.youtube.com
I wanted to know how to use mysql in skript, for example: send the variable {kills.% Player%} to the database. This for some should be a stupid question, but I mess with skripts at one time but never tried using mysql.

Thx for the help.
 
You need to install SQLibrary and setup the config in config.sk.

An example of a config.sk
code_language.skript:
    MySQL:
        type: MySQL
        pattern: db_.*
        host: host
        port: port
        user: user
        password: password
        database: database
        monitor changes: true
        monitor interval: 20 seconds

Since "pattern" is set to "db_.*" for me, to send a variable you would need to do:
code_language.skript:
on death of a player:
    attacker is a player
    add 1 to {db_.kills::%attacker%}
 
SQlibrary has not been updated since 2014. Is it still relevant?
What do you preconize between CSV and MySQL?
 
Sure! I never said it does not work. But, will it be usefull in the long term...I don't know.

Can you say me if you think it's faster than CSV file access?
Yehp SqLite and MySql, it much faster than normal.
 
  • Like
Reactions: Goetheus
Status
Not open for further replies.