mysql_query problem
#1

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
Reply
#2

Always look in your mysql log file for information.
Reply
#3

Код:
[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
Reply
#4

That solves your problem - your mysql connection is wrong. Check your password and username
Reply
#5

Use localhost to connect. Remote connections usually aren't allowed for security reasons. Also they are slower.
Reply
#6

Remove this 192.167.1.11 and post Localhost
Reply
#7

Vince it worked. rep+
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)