10.09.2013, 00:43
Ok fixed and have this
Here
pawn Код:
[07:43:06] ---------------------------
[07:43:06] MySQL Debugging activated (09/10/13)
[07:43:06] ---------------------------
[07:43:06]
[07:43:06] >> mysql_connect( )
[07:43:06] CMySQLHandler::CMySQLHandler() - constructor called.
[07:43:06] CMySQLHandler::CMySQLHandler() - Connecting to "127.0.0.1" | DB: "database" | Username: "root" ...
[07:43:06] CMySQLHandler::Connect() - Connection was successful.
[07:43:06] CMySQLHandler::Connect() - Auto-Reconnect has been enabled.
[07:43:06] >> mysql_query( Connection handle: 1 )
[07:43:06] CMySQLHandler::Query(CREATE TABLE IF NOT EXISTS accounts(user VARCHAR(24), password VARCHAR(24), admin INT(20), cash INT(20), IP VARCHAR(16))) - Successfully executed.
[07:43:32] >> mysql_query( Connection handle: 1 )
[07:43:32] CMySQLHandler::Query(SELECT IP FROM accounts WHERE user = 'Phineas' LIMIT 1) - Successfully executed.
[07:43:32] >> mysql_store_result( Connection handle: 1 )
[07:43:32] CMySQLHandler::StoreResult() - Result was stored.
[07:43:32] >> mysql_num_rows( Connection handle: 1 )
[07:43:32] CMySQLHandler::NumRows() - Returned 0 row(s)
[07:43:32] >> mysql_free_result( Connection handle: 1 )
[07:43:32] CMySQLHandler::FreeResult() - Result was successfully free'd.
[07:43:36] >> mysql_real_escape_string( Connection handle: 1 )
[07:43:36] CMySQLHandler::EscapeString(01204855914); - Escaped 11 characters to 01204855914.
[07:43:36] >> mysql_query( Connection handle: 1 )
[07:43:36] CMySQLHandler::Query(INSERT INTO accounts (user, password, admin, money, IP) VALUES('Phineas', SHA1('01204855914'), 0, 0, '127.0.0.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 '' at line 1)
pawn Код:
format(Query,sizeof(Query),"INSERT INTO accounts (user, password, admin, money, IP) VALUES('%s', SHA1('%s'), 0, 0, '%s'",pname,pass,IP);