29.01.2015, 18:08
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.
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.