MySQL Error ID: 1064
#1

I can't get this to save properly:


Код:
format(query, sizeof(query), "INSERT INTO accounts (`name`, `password`, `posx`, `posy`, `posz`, `posa`, `int`, `vw`, `admin`, `adminduty`, `operator`, `skin`, `banned`, `faction`, `rank` , `housekey`, `minutes` , `hours`, `paycheck`, `earnings`, `bank`, `money`) VALUES ('%s', '%s', '1642.2334', '-2240.4983', '13.4952', '90', '0', '0', '0', '0', '0', '26', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0')", GetName(playerid), epass);
 	mysql_query(query);
PHP код:
[19:48:10] >> mysql_queryConnection handle)
[
19:48:10CMySQLHandler::Query(SELECT FROM accounts WHERE name 'Anthony Consalvr') - Successfully executed.
[
19:48:10] >> mysql_store_resultConnection handle)
[
19:48:10CMySQLHandler::StoreResult() - Result was stored.
[
19:48:10] >> mysql_num_rowsConnection handle)
[
19:48:10CMySQLHandler::NumRows() - Returned 0 row(s)
[
19:48:11] >> mysql_queryConnection handle)
[
19:48:11CMySQLHandler::Query(INSERT INTO accounts (`name`, `password`, `posx`, `posy`, `posz`, `posa`, `int`, `vw`, `admin`, `adminduty`, `operator`, `skin`, `banned`, `faction`, `rank` , `housekey`, `minutes` , `hours`, `paycheck`, `earnings`, `bank`, `money`) VALUES ('Anthony Consalvr''EB49585A635A8AC88622F9203EE2B921C2E5DBF8DCEBCC28877811309F94CEE20624D9B85EBAB13116AD7F9E3EFF451D11B55148A0F8B67A78219A00C406ACF9''1642.2334''-2240.4983''13.4952''90''0''0''0''0''0''26''0''0''0''0''0''0'') - 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 ''' at line 1)
[
19:48:11] >> mysql_queryConnection handle)
[
19:48:11CMySQLHandler::Query(SELECT FROM accounts WHERE name 'Anthony Consalvr') - Successfully executed.
[
19:48:11] >> mysql_store_resultConnection handle)
[
19:48:11CMySQLHandler::StoreResult() - Result was stored.
[
19:48:11] >> mysql_fetch_row_formatConnection handle)
[
19:48:11] >> mysql_free_resultConnection handle)
[
19:48:11CMySQLHandler::FreeResult() - Result was successfully free'd.
[19:48:18] >> mysql_query( Connection handle: 1 )
[19:48:18] CMySQLHandler::Query(UPDATE accounts SET `name` = '
Anthony Consalvr', `posx` = '132.000000', `posy` = '-67.456321', `posz` = '1.578125', `posa` = '0.000000', `int` = '0', `vw` = '0', `admin` = '0', `adminduty` = '0', `operator` = '0', `skin` = '0', `banned` = '0', `faction` = '0', `rank` = '0', `housekey` = '0', `minutes` = '0', `hours` = '0', `paycheck` = '0', `earnings` = '0', `bank` = '0', `money` = '0' WHERE `name` = 'Anthony Consalvr') - Successfully executed. 
Reply
#2

your "query" is certainly too small.
estimate the optimal size for it, apply it and try again.

an optimal size would be 410 (if we assume that "epass" is 32 big)
Reply
#3

Quote:
Originally Posted by CutX
Посмотреть сообщение
your "query" is certainly too small.
estimate the optimal size for it, apply it and try again.
Well that certainly worked, thanks alot!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)