SA-MP Forums Archive
MySQL Doesnt seem to be inserting - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL Doesnt seem to be inserting (/showthread.php?tid=577516)



MySQL Doesnt seem to be inserting - Tropicali - 12.06.2015

I'm having a bit of an issue with registering dialogs.

First off, I'm using a gamemode that's perhaps 2-3 years old and uses MySQL. If I try to register on the server, it doesn't allow me to do that, it just flips back and forth dialogs. However, if I create myself an account through MySQL and log in with those details, it allows me to do this.

What I'm wondering is, is the data somehow now inserting into the table and therefore saving? Because when a player disconnects/the gamemode restarts the data saves, but its just not creating that initial player on the database and I don't know why. I've racked my brain for two days trying to figure it out as I'm teaching myself MySQL and enjoy learning like this, this is just for perserverance and I'd like someone to help me out here.

I don't know where to begin with showing you my code, if someone thinks they can help I'll show you the code here.

Thanks guys.


Re: MySQL Doesnt seem to be inserting - Tropicali - 12.06.2015

When I try to insert the query manually on SQL database it gives me an #1064 error.
Код:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[value-1],[value-2],[value-3],[value-4],[value-5],[value-6],[value-7],[value-8],' at line 1
What's the deal with this? It's an errot with INSERT INTO `players` ecetra.


Re: MySQL Doesnt seem to be inserting - McBan - 12.06.2015

Are you certain the MySQL version is the latest?


Re: MySQL Doesnt seem to be inserting - DetoNater - 12.06.2015

update the mysql plugins to latest and there are bunch of tutorials available, this might help you www.forum.sa-mp.com/showthread.php?t=337810


Re: MySQL Doesnt seem to be inserting - Tropicali - 12.06.2015

The MYSQL plugin is BlueGs R5 I've just noticed, so its fairly outdated. The trouble now is converting all the old functions to new ones. If I do this will it work?


Re: MySQL Doesnt seem to be inserting - rappy93 - 12.06.2015

If the MySQL syntax is correct yes, it will work.


Re: MySQL Doesnt seem to be inserting - Tropicali - 13.06.2015

I've switched the plugin to R6-2 because I don't want to/don't know how to use the whole threaded enquiries thing yet as I'm just practising.

I compile the code and there's no errors, I run the server and theres no errors. It just doesn't save player data (it saves everywhere its supposed to in the script) but when I click the SQL tab in the MySQL table to insert it still gives me that syntax error. Any idea why? This is really bugging me and I need to fix it.