Mysql no save
#1

LOG Mysql
PHP код:
[09:20:10] [DEBUGmysql_connect host"localhost"user"root"database"database"password"****"port3306autoreconnecttruepool_size2
[09:20:10] [DEBUGCMySQLHandle::Create creating new connection..
[
09:20:10] [DEBUGCMySQLHandle::CMySQLHandle constructor called
[09:20:10] [DEBUGCMySQLHandle::Create connection created (id1)
[
09:20:10] [DEBUGCMySQLConnection::Connect establishing connection to database...
[
09:20:11] [DEBUGCMySQLConnection::Connect connection was successful
[09:20:11] [DEBUGCMySQLConnection::Connect auto-reconnect has been enabled
[09:20:11] [DEBUGmysql_errno connection1
[09:20:11] [DEBUGCMySQLConnection::Connect establishing connection to database...
[
09:20:11] [DEBUGCMySQLConnection::Connect establishing connection to database...
[
09:20:11] [DEBUGCMySQLConnection::Connect establishing connection to database...
[
09:20:11] [DEBUGCMySQLConnection::Connect connection was successful
[09:20:11] [DEBUGCMySQLConnection::Connect auto-reconnect has been enabled
[09:20:11] [DEBUGCMySQLConnection::Connect connection was successful
[09:20:11] [DEBUGCMySQLConnection::Connect auto-reconnect has been enabled
[09:20:11] [DEBUGCMySQLConnection::Connect connection was successful
[09:20:11] [DEBUGCMySQLConnection::Connect auto-reconnect has been enabled
[09:20:49] [DEBUGmysql_format connection1len128format"SELECT `Password`, `ID` FROM `users` WHERE `Name` = '%e' LIMIT 1"
[09:20:49] [DEBUGmysql_tquery connection1query"SELECT `Password`, `ID` FROM `users` WHERE `Name` = 'Damar' LIMI"callback"OnAccountCheck"format"i"
[09:20:49] [DEBUGCMySQLQuery::Execute[OnAccountCheck] - starting query execution
[09:20:51] [DEBUGCMySQLQuery::Execute[OnAccountCheck] - query was successfully executed within 1662.285 milliseconds
[09:20:51] [DEBUGCMySQLResult::CMySQLResult() - constructor called
[09:20:51] [DEBUGCalling callback "OnAccountCheck"..
[
09:20:51] [DEBUGcache_get_data connection1
[09:20:51] [DEBUGcache_get_field_content row0field_name"Password"connection1max_len129
[09:20:51] [DEBUGCMySQLResult::GetRowDataByName row'0'field"Password"data"FD9D94340DBD72C11B37EBB0D2A19B4D05E00FD78E4E2CE8923B9EA3A54E900DF181CFB112A8A73228D1F3551680E2AD9701A4FCFB248FA7FA77B95180628BB2"
[09:20:51] [DEBUGcache_get_field_content_int row0field_name"ID"connection1
[09:20:51] [DEBUGCMySQLResult::GetRowDataByName row'0'field"ID"data"2"
[09:20:51] [DEBUGCMySQLResult::~CMySQLResult() - deconstructor called
[09:21:03] [DEBUGmysql_format connection1len100format"SELECT * FROM `users` WHERE `Name` = '%e' LIMIT 1"
[09:21:03] [DEBUGmysql_tquery connection1query"SELECT * FROM `users` WHERE `Name` = 'Damar' LIMIT 1"callback"OnAccountLoad"format"i"
[09:21:03] [DEBUGCMySQLQuery::Execute[OnAccountLoad] - starting query execution
[09:21:03] [DEBUGCMySQLQuery::Execute[OnAccountLoad] - query was successfully executed within 16.311 milliseconds
[09:21:03] [DEBUGCMySQLResult::CMySQLResult() - constructor called
[09:21:03] [DEBUGCalling callback "OnAccountLoad"..
[
09:21:03] [DEBUGcache_get_field_content_int row0field_name"pAdminLevel"connection1
[09:21:03] [DEBUGCMySQLResult::GetRowDataByName row'0'field"pAdminLevel"data"0"
[09:21:03] [DEBUGcache_get_field_content_int row0field_name"Premium"connection1
[09:21:03] [DEBUGCMySQLResult::GetRowDataByName row'0'field"Premium"data"0"
[09:21:03] [DEBUGcache_get_field_content_int row0field_name"pEXP"connection1
[09:21:03] [DEBUGCMySQLResult::GetRowDataByName row'0'field"pEXP"data"0"
[09:21:03] [DEBUGCMySQLResult::~CMySQLResult() - deconstructor called 
What 's wrong with my mysql ?
Reply
#2

It doesn't save what ?
Reply
#3

PHP код:
[09:20:10] [DEBUGmysql_connect host"localhost"user"root"database"database"password"****"port3306autoreconnecttruepool_size2
[09:20:10] [DEBUGCMySQLHandle::Create creating new connection..
[
09:20:10] [DEBUGCMySQLHandle::CMySQLHandle constructor called
[09:20:10] [DEBUGCMySQLHandle::Create connection created (id1)
[
09:20:10] [DEBUGCMySQLConnection::Connect establishing connection to database...
[
09:20:11] [DEBUGCMySQLConnection::Connect connection was successful
[09:20:11] [DEBUGCMySQLConnection::Connect auto-reconnect has been enabled
[09:20:11] [DEBUGmysql_errno connection1
[09:20:11] [DEBUGCMySQLConnection::Connect establishing connection to database...
[
09:20:11] [DEBUGCMySQLConnection::Connect establishing connection to database...
[
09:20:11] [DEBUGCMySQLConnection::Connect establishing connection to database...
[
09:20:11] [DEBUGCMySQLConnection::Connect connection was successful
[09:20:11] [DEBUGCMySQLConnection::Connect auto-reconnect has been enabled
[09:20:11] [DEBUGCMySQLConnection::Connect connection was successful
[09:20:11] [DEBUGCMySQLConnection::Connect auto-reconnect has been enabled
[09:20:11] [DEBUGCMySQLConnection::Connect connection was successful
[09:20:11] [DEBUGCMySQLConnection::Connect auto-reconnect has been enabled
[09:20:49] [DEBUGmysql_format connection1len128format"SELECT `Password`, `ID` FROM `users` WHERE `Name` = '%e' LIMIT 1"
[09:20:49] [DEBUGmysql_tquery connection1query"SELECT `Password`, `ID` FROM `users` WHERE `Name` = 'Damar' LIMI"callback"OnAccountCheck"format"i"
[09:20:49] [DEBUGCMySQLQuery::Execute[OnAccountCheck] - starting query execution
[09:20:51] [DEBUGCMySQLQuery::Execute[OnAccountCheck] - query was successfully executed within 1662.285 milliseconds
[09:20:51] [DEBUGCMySQLResult::CMySQLResult() - constructor called
[09:20:51] [DEBUGCalling callback "OnAccountCheck"..
[
09:20:51] [DEBUGcache_get_data connection1
[09:20:51] [DEBUGcache_get_field_content row0field_name"Password"connection1max_len129
[09:20:51] [DEBUGCMySQLResult::GetRowDataByName row'0'field"Password"data"FD9D94340DBD72C11B37EBB0D2A19B4D05E00FD78E4E2CE8923B9EA3A54E900DF181CFB112A8A73228D1F3551680E2AD9701A4FCFB248FA7FA77B95180628BB2"
[09:20:51] [DEBUGcache_get_field_content_int row0field_name"ID"connection1
[09:20:51] [DEBUGCMySQLResult::GetRowDataByName row'0'field"ID"data"2"
[09:20:51] [DEBUGCMySQLResult::~CMySQLResult() - deconstructor called
[09:21:03] [DEBUGmysql_format connection1len100format"SELECT * FROM `users` WHERE `Name` = '%e' LIMIT 1"
[09:21:03] [DEBUGmysql_tquery connection1query"SELECT * FROM `users` WHERE `Name` = 'Damar' LIMIT 1"callback"OnAccountLoad"format"i"
[09:21:03] [DEBUGCMySQLQuery::Execute[OnAccountLoad] - starting query execution
[09:21:03] [DEBUGCMySQLQuery::Execute[OnAccountLoad] - query was successfully executed within 16.311 milliseconds
[09:21:03] [DEBUGCMySQLResult::CMySQLResult() - constructor called
[09:21:03] [DEBUGCalling callback "OnAccountLoad"..
[
09:21:03] [DEBUGcache_get_field_content_int row0field_name"pAdminLevel"connection1
[09:21:03] [DEBUGCMySQLResult::GetRowDataByName row'0'field"pAdminLevel"data"0"
[09:21:03] [DEBUGcache_get_field_content_int row0field_name"Premium"connection1
[09:21:03] [DEBUGCMySQLResult::GetRowDataByName row'0'field"Premium"data"0"
[09:21:03] [DEBUGcache_get_field_content_int row0field_name"pEXP"connection1
[09:21:03] [DEBUGCMySQLResult::GetRowDataByName row'0'field"pEXP"data"0"
[09:21:03] [DEBUGCMySQLResult::~CMySQLResult() - deconstructor called
[09:40:07] [DEBUGmysql_format connection1len128format"UPDATE `database` SET `pEXP` = %d, `Premium` = %d, `pAdminLevel` = %d,"
[09:40:07] [DEBUGmysql_tquery connection1query"UPDATE `database` SET `pEXP` = 0, `Premium` = 0, `pAdminLevel` ="callback"(null)"format"(null)"
[09:40:07] [DEBUGCMySQLQuery::Execute[] - starting query execution
[09:40:07] [ERRORCMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
[09:40:07] [DEBUGCMySQLQuery::Execute[] - error will be triggered in OnQueryError 
Reply
#4

[09:40:07] [ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1

Post where you save your stuff.
Reply
#5

PHP код:
public OnPlayerDisconnect(playeridreason)
{
    new 
query[128];

    
mysql_format(mysqlquerysizeof(query), "UPDATE `database` SET `pEXP` = %d, `Premium` = %d, `pAdminLevel` = %d,",
    
pInfo[playerid][pEXP], pInfo[playerid][Premium], pInfo[playerid][pAdminLevel]);
    
mysql_tquery(mysqlquery"""");
    

    
SetPVarInt(playerid"laser"0);
     
RemovePlayerAttachedObject(playerid0);
    if(
InfectedLeft[playerid] == 1)
    {
        
ZombieTimer SetTimer("ZombieCounts",3000,1);
        
InfectedLeft[playerid] = 0;
    }
    return 
1;

Reply
#6

Quote:
Originally Posted by Izaki
Посмотреть сообщение
PHP код:
public OnPlayerDisconnect(playeridreason)
{
    new 
query[128];
    
mysql_format(mysqlquerysizeof(query), "UPDATE `database` SET `pEXP` = %d, `Premium` = %d, `pAdminLevel` = %d,",
    
pInfo[playerid][pEXP], pInfo[playerid][Premium], pInfo[playerid][pAdminLevel]);
    
mysql_tquery(mysqlquery"""");
    
    
SetPVarInt(playerid"laser"0);
     
RemovePlayerAttachedObject(playerid0);
    if(
InfectedLeft[playerid] == 1)
    {
        
ZombieTimer SetTimer("ZombieCounts",3000,1);
        
InfectedLeft[playerid] = 0;
    }
    return 
1;

As you're trying to update a players stats you need to assign the update somewhere rather than updating the database and hoping it does something.

PHP код:
UPDATE `table.nameSET `pEXP`='%i', `Premium`='%i', `pAdminLevel` = '%i' WHERE `ID`='%d' 
Reply
#7

PHP код:
[00:01:51] [DEBUGCMySQLQuery::Execute[] - starting query execution
[00:01:51] [ERRORCMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
[00:01:51] [DEBUGCMySQLQuery::Execute[] - error will be triggered in OnQueryError 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)