mysql_query problem - 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_query problem (
/showthread.php?tid=542578)
mysql_query problem -
Sielly - 20.10.2014
Hello,
I am connected to my database and i am trying to make query:
pawn Код:
new query[256], nick[32];
GetPlayerName(playerid,nick,32);
mysql_format(MySql, query, 256, "INSERT INTO `konta` (`nick`, `haslo`, `datazalozenia`) VALUES ('%s', '%s', '0')",nick,HasloPrzyRejestracji[playerid]);
mysql_query(MySql, query);
of course i created database and table, but it still doesn't work..
i'm using this:
https://sampforum.blast.hk/showthread.php?tid=56564
Re: mysql_query problem -
zaibaslr2 - 20.10.2014
Always look in your mysql log file for information.
Re: mysql_query problem -
Sielly - 20.10.2014
Код:
[15:27:14] [ERROR] CMySQLConnection::Connect - (error #2003) Can't connect to MySQL server on '192.167.1.11' (10060)
[15:27:35] [ERROR] CMySQLConnection::Connect - (error #2003) Can't connect to MySQL server on '192.167.1.11' (10060)
[15:27:35] [ERROR] CMySQLConnection::Connect - (error #2003) Can't connect to MySQL server on '192.167.1.11' (10060)
[15:27:57] [ERROR] CMySQLQuery::Execute - (error #2006) MySQL server has gone away
Re: mysql_query problem -
zaibaslr2 - 20.10.2014
That solves your problem - your mysql connection is wrong. Check your password and username
Re: mysql_query problem -
Vince - 20.10.2014
Use localhost to connect. Remote connections usually aren't allowed for security reasons. Also they are slower.
Re: mysql_query problem -
MORJAN5566 - 20.10.2014
Remove this 192.167.1.11 and post Localhost
Re: mysql_query problem -
Sielly - 20.10.2014
Vince it worked. rep+