MySQL connection problem.
#9

Just as expected:
When connecting, you're saving the connection handle "1" in variable "g_mysql_handle".
In many mysql-statements, you're using "mysql" as connection handle, which will be 0.
You're also using "connHandle" as connection handle during OnDialogResponse, which you also take from "playerConnectHandle[playerid]", which is weird as the script only needs 1 connection to the database, not different handles per player.

You should ALWAYS use the same variable, you can expect problems such as this when you use 4 different variables as connection handle to one database.

The solution is simple: replace all your connection handles with "g_mysql_handle" in every mysql-command and it should work.
Reply


Messages In This Thread
MySQL connection problem. - by Glenn332 - 29.01.2015, 16:59
Re: MySQL connection problem. - by PowerPC603 - 29.01.2015, 17:39
Re: MySQL connection problem. - by Glenn332 - 29.01.2015, 17:42
Re: MySQL connection problem. - by PowerPC603 - 29.01.2015, 17:47
Re: MySQL connection problem. - by Glenn332 - 29.01.2015, 17:54
Re: MySQL connection problem. - by Smally - 29.01.2015, 17:58
Re: MySQL connection problem. - by PowerPC603 - 29.01.2015, 18:00
Re: MySQL connection problem. - by Glenn332 - 29.01.2015, 18:02
Re: MySQL connection problem. - by PowerPC603 - 29.01.2015, 18:08
Re: MySQL connection problem. - by Glenn332 - 29.01.2015, 18:11

Forum Jump:


Users browsing this thread: 2 Guest(s)