Failed to exeute query. Lost connection to MySQL server during query. -
*IsBack - 04.01.2011
Hi,
I got this strange problem.. I get this:
Quote:
[Tue Jan 04 14:15:45 2011] Function: mysql_query executed: "UPDATE `table` SET `field`='101,103,' WHERE (`id` = '1')" with result: "1".
[Tue Jan 04 14:15:45 2011] Error (0): Failed to exeute query. Lost connection to MySQL server during query.
|
And the pawn code is:
pawn Код:
MySQLCheck();
new items[20] = "",queryStr[150];
if(GPS[playerid] == 1)
{
format(items,20,"%i,",ITEM_GPS);
}
if(Phone[playerid] == 1)
{
format(items,20,"%s%i,",items,ITEM_PHONE);
}
if(hMetter[playerid] == 1)
{
format(items,20,"%s%i,",items,ITEM_HEALTH);
}
if(Radio[playerid] == 1)
{
format(items,20,"%s%i,",items,ITEM_RADIO);
}
format(queryStr,150,"UPDATE `table` SET `field`='%s' WHERE (`id` = '%i')",items,GetPVarInt(playerid, "pID"));
mysql_query(queryStr);
Why it disconnects from mysql server?
If I try to put this query:
Quote:
UPDATE `table` SET `field`='101,103,' WHERE (`id` = '1')
|
through phpMyAdmin, it works with no problems.. :S
I'm using this mysql plugin:
https://sampforum.blast.hk/showthread.php?tid=122983
Other queries works OK, except this one..
Re: Failed to exeute query. Lost connection to MySQL server during query. -
*IsBack - 04.01.2011
So strange problem.. :S
Re: Failed to exeute query. Lost connection to MySQL server during query. -
TehEbil - 04.01.2011
What about the mysql_log? It may help.
Re: Failed to exeute query. Lost connection to MySQL server during query. -
*IsBack - 04.01.2011
Quote:
Originally Posted by TehEbil
What about the mysql_log? It may help.
|
It doesn't:
Quote:
[Tue Jan 04 14:15:45 2011] Function: mysql_query executed: "UPDATE `table` SET `field`='101,103,' WHERE (`id` = '1')" with result: "1".
[Tue Jan 04 14:15:45 2011] Error (0): Failed to exeute query. Lost connection to MySQL server during query.
[Tue Jan 04 14:21:30 2011] Function: mysql_ping executed with result: "1".
|
And after this, all other queries goes like this:
Quote:
[Tue Jan 04 14:21:30 2011] Error (0): Could not execute query. MySQL server has gone away.
|
Re: Failed to exeute query. Lost connection to MySQL server during query. -
hanzen - 04.01.2011
Your MySQL doesn't seem to like you.
Re: Failed to exeute query. Lost connection to MySQL server during query. -
Calgon - 04.01.2011
I know what the problem is, but according your signature, "You [I] don't want to talk to [you] me." due to my age (b).
Re: Failed to exeute query. Lost connection to MySQL server during query. -
*IsBack - 04.01.2011
Quote:
Originally Posted by Calgon
I know what the problem is, but according your signature, "You [I] don't want to talk to [you] me." due to my age (b).
|
Ok.. fixed my signature.. :/
Hopefully we can talk now?
Re: Failed to exeute query. Lost connection to MySQL server during query. -
*IsBack - 05.01.2011
This is still unsolved..
Re: Failed to exeute query. Lost connection to MySQL server during query. -
Calgon - 05.01.2011
Change your query to:
pawn Код:
UPDATE table SET field = '%s' WHERE id = %i
Strings belong in single-quotes and not integers.
Re: Failed to exeute query. Lost connection to MySQL server during query. -
*IsBack - 06.01.2011
Quote:
Originally Posted by Calgon
Change your query to:
pawn Код:
UPDATE table SET field = '%s' WHERE id = %i
Strings belong in single-quotes and not integers.
|
Does not help..
Here's how my query looks now:
Quote:
[Thu Jan 06 11:47:58 2011] Function: mysql_query executed: "UPDATE table SET field='101,103,' WHERE id = 1" with result: "1"." with result: "1".
[Thu Jan 06 11:47:58 2011] Error (0): Failed to exeute query. Lost connection to MySQL server during query.
|