btk5h / skript-db

MIT License
5 stars 5 forks source link

Can't insert a new entry in my database #8

Open Diamax10 opened 6 years ago

Diamax10 commented 6 years ago

Hello,

I have a problem when I want to do an "INSERT INTO" query to my SQL server it does nothing. I've tested with 1.11.2 - 1.12.1 - 1.12.2 Minecraft's version but it does not work :/ I can do a "SELECT" query it works but not an insert ... In the past it worked perfectly (in another server). No errors in the console. I tested my server's mysql user and root user.

Informations: Skript dev35b (tested with dev34) Skript code : execute "INSERT INTO `players` (`name`, `uuid`, `rank`, `works`, `friend_invitation`, `register_date`, `last_seen`, `last_ip`) VALUES (%name of player%, %UUID of player%, 'Joueur', '', 'allow', %now%, %now%, %ip of player%)" in {sql}

Plugins: Skript, skript-db, skript-mirror

Thanks for your help :)

btk5h commented 6 years ago

Does the last database error contain anything after executing that statement?

Diamax10 commented 6 years ago

Yes, it says : Invalid argument value: java.io.NotSerializableException

Diamax10 commented 6 years ago

Hello, do you have anything new about the problem ?

If I execute SQL command in CLI it works perfectly

btk5h commented 6 years ago

Skript's date class cannot be stored directly in a database. I'll add a way to convert Skript dates into SQL dates.

Diamax10 commented 6 years ago

Yeah, it works perfectly when I convert date to text :)

Hakim567 commented 6 years ago

any updates?