|
Big Clucker
Join Date: Sep 2014
Location: Indonesia, Jakarta Timur
Posts: 68
Reputation: 0
|
database mysql no load invalid datatype
DEBUG MYSQL
PHP Code:
[02:01:55] [DEBUG] mysql_connect - host: "localhost", user: "root", database: "database", password: "****", port: 3306, autoreconnect: true, pool_size: 2 [02:01:55] [DEBUG] CMySQLHandle::Create - creating new connection..
[02:01:55] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called [02:01:55] [DEBUG] CMySQLHandle::Create - connection created (id: 1)
[02:01:55] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[02:01:55] [DEBUG] CMySQLConnection::Connect - connection was successful [02:01:55] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled [02:01:55] [DEBUG] mysql_errno - connection: 1 [02:01:55] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[02:01:55] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[02:01:55] [DEBUG] CMySQLConnection::Connect - connection was successful [02:01:55] [DEBUG] CMySQLConnection::Connect - connection was successful [02:01:55] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled [02:01:55] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled [02:01:55] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled [02:02:22] [DEBUG] mysql_format - connection: 1, len: 128, format: "SELECT `Password`, `ID` FROM `users` WHERE `Name` = '%e' LIMIT 1" [02:02:22] [DEBUG] mysql_tquery - connection: 1, query: "SELECT `Password`, `ID` FROM `users` WHERE `Name` = 'damar' LIMI", callback: "OnAccountCheck", format: "i" [02:02:22] [DEBUG] CMySQLQuery::Execute[OnAccountCheck] - starting query execution [02:02:22] [DEBUG] CMySQLQuery::Execute[OnAccountCheck] - query was successfully executed within 1.174 milliseconds [02:02:22] [DEBUG] CMySQLResult::CMySQLResult() - constructor called [02:02:22] [DEBUG] Calling callback "OnAccountCheck"..
[02:02:22] [DEBUG] cache_get_data - connection: 1 [02:02:22] [DEBUG] cache_get_field_content - row: 0, field_name: "Password", connection: 1, max_len: 129 [02:02:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Password", data: "FD9D94340DBD72C11B37EBB0D2A19B4D05E00FD78E4E2CE8923B9EA3A54E900DF181CFB112A8A73228D1F3551680E2AD9701A4FCFB248FA7FA77B95180628BB2" [02:02:22] [DEBUG] cache_get_field_content_int - row: 0, field_name: "ID", connection: 1 [02:02:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "ID", data: "2" [02:02:22] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called [02:02:27] [DEBUG] mysql_format - connection: 1, len: 214, format: "SELECT * FROM `users` WHERE `Name` = '%e'" [02:02:27] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `users` WHERE `Name` = ''", callback: "OnAccountLoad", format: "i" [02:02:27] [DEBUG] CMySQLQuery::Execute[OnAccountLoad] - starting query execution [02:02:27] [DEBUG] CMySQLQuery::Execute[OnAccountLoad] - query was successfully executed within 0.479 milliseconds [02:02:27] [DEBUG] CMySQLResult::CMySQLResult() - constructor called [02:02:27] [DEBUG] Calling callback "OnAccountLoad"..
[02:02:27] [DEBUG] cache_get_field_content_int - row: 0, field_name: "ID", connection: 1 [02:02:27] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[02:02:27] [ERROR] cache_get_field_content_int - invalid datatype [02:02:27] [DEBUG] cache_get_field_content_int - row: 0, field_name: "pEXP", connection: 1 [02:02:27] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[02:02:27] [ERROR] cache_get_field_content_int - invalid datatype [02:02:27] [DEBUG] cache_get_field_content_int - row: 0, field_name: "pAdminLevel", connection: 1 [02:02:27] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[02:02:27] [ERROR] cache_get_field_content_int - invalid datatype [02:02:27] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Premium", connection: 1 [02:02:27] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[02:02:27] [ERROR] cache_get_field_content_int - invalid datatype [02:02:27] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called [02:02:57] [DEBUG] mysql_format - connection: 1, len: 526, format: "UPDATE `users` SET `pEXP` = '%d', `Premium` = %d, `pAdminLevel` = %d WHERE `Name` = '%s'" [02:02:57] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `users` SET `pEXP` = '10000', `Premium` = 0, `pAdminLevel", callback: "(null)", format: "(null)" [02:02:57] [DEBUG] CMySQLQuery::Execute[] - starting query execution [02:02:57] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 55.29 milliseconds [02:02:57] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
scipt AccountLoad
PHP Code:
forward OnAccountLoad(playerid);
public OnAccountLoad(playerid)
{
pInfo[playerid][ID] = cache_get_field_content_int(0, "ID");
pInfo[playerid][pEXP] = cache_get_field_content_int(0, "pEXP");
pInfo[playerid][pAdminLevel] = cache_get_field_content_int(0, "pAdminLevel");
pInfo[playerid][Premium] = cache_get_field_content_int(0, "Premium");TogglePlayerSpectating(playerid, false);GivePlayerMoney(playerid, pInfo[playerid][pEXP]);SendClientMessage(playerid, -1, "You have successfully logged in.");
SpawnPlayer(playerid);
return 1;
}
scipt save player
PHP Code:
stock SaveStats(playerid)
{
new query[526];mysql_format(mysql, query, sizeof(query), "UPDATE `users` SET `pEXP` = '%d', `Premium` = %d, `pAdminLevel` = %d WHERE `Name` = '%s'",
pInfo[playerid][pEXP], pInfo[playerid][Premium], pInfo[playerid][pAdminLevel], PlayerName(playerid));
mysql_tquery(mysql, query);
return 1;
}
__________________

|
Aucun commentaire:
Enregistrer un commentaire