mysql error: 1064
#1

Код:
[01:30:23]  

[01:30:23] ---------------------------

[01:30:23] MySQL Debugging activated (08/29/14)

[01:30:23] ---------------------------

[01:30:23]  

[01:30:44] >> mysql_query( Connection handle: 1 )

[01:30:44] CMySQLHandler::Query(SELECT * FROM 'bans' WHERE ('Name'=Username OR 'IpAddress'=127.0.0.1) AND status = 1) - An error has occured. (Error ID: 1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''bans' WHERE ('Name'=Username OR 'IpAddress'=127.0.0.1) AND status = 1' at line 1)

[01:30:44] >> mysql_store_result( Connection handle: 1 )

[01:30:44] CMySQLHandler::StoreResult() - No data to store.

[01:30:44] >> mysql_num_rows( Connection handle: 1 )

[01:30:44] CMySQLHandler::NumRows() - You cannot call this function now. (Reason: Dead Connection)

[01:30:44] >> mysql_free_result( Connection handle: 1 )

[01:30:44] CMySQLHandler::FreeResult() - The result is already empty.

[01:30:44] >> mysql_query( Connection handle: 1 )

[01:30:44] CMySQLHandler::Query(SELECT * FROM 'accounts' WHERE 'pName'=Username) - An error has occured. (Error ID: 1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''accounts' WHERE 'pName'=Username' at line 1)

[01:30:44] >> mysql_store_result( Connection handle: 1 )

[01:30:44] CMySQLHandler::StoreResult() - No data to store.

[01:30:44] >> mysql_num_rows( Connection handle: 1 )

[01:30:44] CMySQLHandler::NumRows() - You cannot call this function now. (Reason: Dead Connection)

[01:30:44] OnQueryError() - Called.

[01:30:44] OnQueryError() - Called.

[01:31:01] >> mysql_query( Connection handle: 1 )

[01:31:01] CMySQLHandler::Query(UPDATE 'accounts' SET 'pName'=, 'pPassword'=, 'pAdmin'=0, 'pPos'= '112.654479 -33.931766 1.578125', 'pMoney'=0, 'pVIP'=0, 'pSkinID'=0, 'pLevel'=0, 'pVW'=0, 'pInterior'=0, 'pKills'=0, 'pDeaths'=0, 'pHealth'=0.000000, 'pArmour'=0.000000, 'pBanned'=0 WHERE 'pID'=) - An error has occured. (Error ID: 1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''accounts' SET 'pName'=, 'pPassword'=, 'pAdmin'=0, 'pPos'= '112.654479 -33.93176' at line 1)

[01:31:01] OnQueryError() - Called.
pawn Код:
format(query, sizeof(query), "UPDATE 'accounts' SET pName = %s, pPassword =%s, pAdmin = %d, pPos = '%f %f %f', pMoney = %d, pVIP =%d, pSkinID = %d, pLevel = %d, pVW = 0, pInterior = %d, pKills = %d, pDeaths = %d, pHealth = %f, pArmour = %f, pBanned = %d WHERE pID = %d",

format(query, sizeof(query), "SELECT * FROM 'accounts' WHERE pName = '%s'", GetName(playerid));

format(query, sizeof(query), "SELECT * FROM 'bans' WHERE ('Name'=%s OR 'IpAddress'=%s) AND status = 1", GetName(playerid), pIpAddress);
MYSQL r6
I've no clue what to do.
Reply
#2

not ' ' only string in this '%s' table in `` not '' and fields not in ' '

pawn Код:
"SELECT * FROM `accounts` WHERE pName = '%s'"
Reply
#3

Quote:
Originally Posted by Jefff
Посмотреть сообщение
not ' ' only string in this '%s' table in `` not '' and fields not in ' '

pawn Код:
"SELECT * FROM `accounts` WHERE pName = '%s'"
I have no clue what you mean with "not ' ' only string in this '%s' table in `` not '' and fields not in ' '".
Reply
#4

Change this :

Код:
"SELECT * FROM `accounts` WHERE pName = '%s'"
To This

Код:
"SELECT * FROM `accounts` WHERE pName = '%s'
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)