mysql server problem -
pantelimonfl - 20.07.2011
I took from the moderntopia with the r6 plugin the login, register and update system. It doesn't load the data from the database and doesn't save it when i close.
When i close the server i get the "don't send" error.
pawn Код:
public OnPlayerLogin(playerid,password[])
{
MySQLCheckConnection();
new tmp2[256];
new string2[64];
new playername2[MAX_PLAYER_NAME];
new playernamesplit[3][MAX_PLAYER_NAME];
GetPlayerName(playerid, playername2, sizeof(playername2));
split(playername2, playernamesplit, '_');
MySQLFetchAcctSingle(PlayerInfo[playerid][pSQLID], "Password", PlayerInfo[playerid][pPass]);
if(strcmp(PlayerInfo[playerid][pPass],password, true ) == 0 )
{
mysql_query("SELECT * FROM `users`");
mysql_store_result();
if (mysql_num_rows())
{
new field[64], data[256];
mysql_fetch_row(data);
mysql_fetch_field_row(field, "Level");
PlayerInfo[playerid][pLevel] = strval(field);
mysql_fetch_row(data);
mysql_fetch_field_row(field, "Money");
PlayerInfo[playerid][pMoney] = strval(field);
mysql_fetch_row(data);
mysql_fetch_field_row(field, "Admin");
PlayerInfo[playerid][pAdmin] = strval(field);
mysql_fetch_row(data);
mysql_fetch_field_row(field, "Vip");
PlayerInfo[playerid][pVip] = strval(field);
mysql_fetch_row(data);
mysql_fetch_field_row(field, "Pos_x");
PlayerInfo[playerid][pPos_x] = strval(field);
mysql_fetch_row(data);
mysql_fetch_field_row(field, "Pos_y");
PlayerInfo[playerid][pPos_y] = strval(field);
.
.
.
.
}
mysql_free_result();
}
pawn Код:
public SaveAccount(playerid)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid])
{
MySQLCheckConnection();
new query[MAX_STRING];
format(query, MAX_STRING, "UPDATE players SET ");
MySQLUpdatePlayerStr(query, PlayerInfo[playerid][pSQLID], "Password", PlayerInfo[playerid][pPass]);
PlayerInfo[playerid][pMoney] = GetPlayerMoney(playerid);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Level", PlayerInfo[playerid][pLevel]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Money", PlayerInfo[playerid][pMoney]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Admin", PlayerInfo[playerid][pAdmin]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Vip", PlayerInfo[playerid][pVip]);
.
.
.
.
MySQLUpdateFinish(query, PlayerInfo[playerid][pSQLID]);
}
}
return 1;
}]
Re: mysql server problem -
Hal - 20.07.2011
Turn debugging on, and post your mysql log.
Re: mysql server problem -
pantelimonfl - 20.07.2011
How can i do that?
Re: mysql server problem -
Grim_ - 20.07.2011
Call the mysql_debug( ) function inside OnGameModeInit/OnFilterScriptInit function. The debug content will be printed to mysql.log
Re: mysql server problem -
pantelimonfl - 20.07.2011
Here is the whole debug.txt
Код:
[23:15:41]
[23:15:41] ---------------------------
[23:15:41] MySQL Debugging activated (07/20/11)
[23:15:41] ---------------------------
[23:15:41]
[23:15:41] >> mysql_connect( )
[23:15:41] CMySQLHandler::CMySQLHandler() - constructor called.
[23:15:41] CMySQLHandler::CMySQLHandler() - Connecting to "localhost" | DB: "samp" | Username: "root" ...
[23:15:41] CMySQLHandler::Connect() - Connection was successful.
[23:15:41] CMySQLHandler::Connect() - Auto-Reconnect has been enabled.
[23:15:41] >> mysql_ping( Connection handle: 1 )
[23:15:41] CMySQLHandler::Ping() - Connection is still alive.
[23:16:08] >> mysql_ping( Connection handle: 1 )
[23:16:08] CMySQLHandler::Ping() - Connection is still alive.
[23:16:08] >> mysql_real_escape_string( Connection handle: 1 )
[23:16:08] CMySQLHandler::EscapeString(Larry_Dee); - Escaped 9 characters to Larry_Dee.
[23:16:08] >> mysql_query( Connection handle: 1 )
[23:16:08] CMySQLHandler::Query(SELECT `id` FROM `players` WHERE LOWER(Name) = LOWER('Larry_Dee') LIMIT 1) - Successfully executed.
[23:16:08] >> mysql_store_result( Connection handle: 1 )
[23:16:08] CMySQLHandler::StoreResult() - Result was stored.
[23:16:08] >> mysql_num_rows( Connection handle: 1 )
[23:16:08] CMySQLHandler::NumRows() - Returned 1 row(s)
[23:16:08] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:08] CMySQLHandler::FetchRow() - Return: 1
[23:16:08] >> mysql_query( Connection handle: 1 )
[23:16:08] CMySQLHandler::Query(SELECT Lock FROM players WHERE id = 1 LIMIT 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 'Lock FROM players WHERE id = 1 LIMIT 1' at line 1)
[23:16:08] >> mysql_store_result( Connection handle: 1 )
[23:16:08] CMySQLHandler::StoreResult() - No data to store.
[23:16:08] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:08] CMySQLHandler::FetchRow() - You cannot call this function now. (Reason: Empty Result)
[23:16:12] >> mysql_ping( Connection handle: 1 )
[23:16:12] CMySQLHandler::Ping() - Connection is still alive.
[23:16:12] >> mysql_query( Connection handle: 1 )
[23:16:12] CMySQLHandler::Query(SELECT Password FROM players WHERE id = 1 LIMIT 1) - Successfully executed.
[23:16:12] >> mysql_store_result( Connection handle: 1 )
[23:16:12] CMySQLHandler::StoreResult() - Result was stored.
[23:16:12] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:12] CMySQLHandler::FetchRow() - Return: asd
[23:16:14] >> mysql_ping( Connection handle: 1 )
[23:16:14] CMySQLHandler::Ping() - Connection is still alive.
[23:16:14] >> mysql_query( Connection handle: 1 )
[23:16:14] CMySQLHandler::Query(SELECT Password FROM players WHERE id = 1 LIMIT 1) - Successfully executed.
[23:16:14] >> mysql_store_result( Connection handle: 1 )
[23:16:14] CMySQLHandler::StoreResult() - Result was stored.
[23:16:14] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:14] CMySQLHandler::FetchRow() - Return: asd
[23:16:16] >> mysql_ping( Connection handle: 1 )
[23:16:16] CMySQLHandler::Ping() - Connection is still alive.
[23:16:16] >> mysql_query( Connection handle: 1 )
[23:16:16] CMySQLHandler::Query(SELECT Password FROM players WHERE id = 1 LIMIT 1) - Successfully executed.
[23:16:16] >> mysql_store_result( Connection handle: 1 )
[23:16:16] CMySQLHandler::StoreResult() - Result was stored.
[23:16:16] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:16] CMySQLHandler::FetchRow() - Return: asd
[23:16:16] >> mysql_query( Connection handle: 1 )
[23:16:16] CMySQLHandler::Query(SELECT * FROM `players`) - Successfully executed.
[23:16:16] >> mysql_store_result( Connection handle: 1 )
[23:16:16] CMySQLHandler::StoreResult() - Result was stored.
[23:16:16] >> mysql_num_rows( Connection handle: 1 )
[23:16:16] CMySQLHandler::NumRows() - Returned 1 row(s)
[23:16:16] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:16] CMySQLHandler::FetchRow() - Return: 1|larry_dee|asd|3|5000000|10|0|111.805|-78.8418|2|0|0|0|0|0|0|0|0|0|0|100|0|0|0|0|0||0000-00-00||0|0|0|0
[23:16:16] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:16] CMySQLHandler::FetchField("Level") - 3
[23:16:16] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:16] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:16] CMySQLHandler::FetchField(Money) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:16] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:16] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:16] CMySQLHandler::FetchField(Admin) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:16] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:16] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:16] CMySQLHandler::FetchField(Vip) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:16] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:16] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:16] CMySQLHandler::FetchField(Pos_x) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:16] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:16] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:16] CMySQLHandler::FetchField(Pos_y) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:16] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:16] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:16] CMySQLHandler::FetchField(Pos_z) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:16] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:16] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:16] CMySQLHandler::FetchField(Carkey) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:16] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:16] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:16] CMySQLHandler::FetchField(Carkey2) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:16] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:16] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:16] CMySQLHandler::FetchField(Carkey3) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:16] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:16] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:16] CMySQLHandler::FetchField(Fcarkey) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:16] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:16] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:16] CMySQLHandler::FetchField(Health) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:16] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:16] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:16] CMySQLHandler::FetchField(Respect) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:16] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:16] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:16] CMySQLHandler::FetchField(Mask) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:16] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:16] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:16] CMySQLHandler::FetchField(Maskuse) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:16] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:16] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:16] CMySQLHandler::FetchField(Leader) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:16] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:16] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:16] CMySQLHandler::FetchField(Member) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:16] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:16] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:17] CMySQLHandler::FetchField(Char) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:17] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:17] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:17] CMySQLHandler::FetchField(Int) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:17] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:17] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:17] CMySQLHandler::FetchField(VirWorld) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:17] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:17] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:17] CMySQLHandler::FetchField(Walkie) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:17] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:17] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:17] CMySQLHandler::FetchField(Walkiefreq) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:17] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:17] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:17] CMySQLHandler::FetchField(Lock) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:17] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:17] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:17] CMySQLHandler::FetchField(Ban Reason) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:17] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:17] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:17] CMySQLHandler::FetchField(Lock Date) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:17] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:17] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:17] CMySQLHandler::FetchField(Locked By) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:17] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:17] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:17] CMySQLHandler::FetchField(Tut) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:17] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:17] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:17] CMySQLHandler::FetchField(Sex) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:17] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:17] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:17] CMySQLHandler::FetchField(Origin) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:17] >> mysql_fetch_row_format( Connection handle: 1 )
[23:16:17] >> mysql_fetch_field_row( Connection handle: 1 )
[23:16:17] CMySQLHandler::FetchField(Age) - You cannot call this function now. (Reason: Fields/Rows are empty.)
[23:16:17] >> mysql_free_result( Connection handle: 1 )
[23:16:17] CMySQLHandler::FreeResult() - Result was successfully free'd.
[23:16:25] >> mysql_ping( Connection handle: 1 )
[23:16:25] CMySQLHandler::Ping() - Connection is still alive.
[23:16:25] >> mysql_real_escape_string( Connection handle: 1 )
[23:16:25] CMySQLHandler::EscapeString(a); - Escaped 2 characters to a.
[23:16:25] >> mysql_query( Connection handle: 1 )
[23:16:25] CMySQLHandler::Query(UPDATE players SET Password='a',Level=3,Money=0,Admin=0,Vip=0,Pos_x=1117893343,Pos_y=-1038770384,Pos_z=1058799616,Carkey=0,Carkey2=0,Carkey3=0,Fcarkey=0,Leader=0,Member=0,Rank=0,Char=0,VirWorld=0,Int=0,Health=1120403456 WHERE id=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 'Char=0,VirWorld=0,Int=0,Health=1120403456 WHERE id=1' at line 1)
[23:16:25] >> mysql_query( Connection handle: 1 )
[23:16:25] CMySQLHandler::Query(UPDATE players SET Mask=0,Maskuse=0,Walkie=0,Wtfreq=0,Lock=0,Ban Reason=0,Lock Date=0,Locked By=0,Tut=0,Sex=0,Origin=0,Age=0 WHERE id=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 'Lock=0,Ban Reason=0,Lock Date=0,Locked By=0,Tut=0,Sex=0,Origin=0,Age=0 WHERE id=' at line 1)
[23:16:39] CMySQLHandler::~CMySQLHandler() - deconstructor called.
[23:16:39] CMySQLHandler::FreeResult() - The result is already empty.
[23:16:39] CMySQLHandler::Disconnect() - Connection was closed.
Re: mysql server problem -
Grim_ - 20.07.2011
You only need to fetch the row from the database once, not however many fields you retrieve from it.
pawn Код:
public OnPlayerLogin(playerid,password[])
{
MySQLCheckConnection();
new tmp2[256];
new string2[64];
new playername2[MAX_PLAYER_NAME];
new playernamesplit[3][MAX_PLAYER_NAME];
GetPlayerName(playerid, playername2, sizeof(playername2));
split(playername2, playernamesplit, '_');
MySQLFetchAcctSingle(PlayerInfo[playerid][pSQLID], "Password", PlayerInfo[playerid][pPass]);
if(strcmp(PlayerInfo[playerid][pPass],password, true ) == 0 )
{
mysql_query("SELECT * FROM `users`");
mysql_store_result();
if (mysql_num_rows())
{
new field[64], data[256];
mysql_fetch_row(data);
mysql_fetch_field_row(field, "Level");
PlayerInfo[playerid][pLevel] = strval(field);
mysql_fetch_field_row(field, "Money");
PlayerInfo[playerid][pMoney] = strval(field);
mysql_fetch_field_row(field, "Admin");
PlayerInfo[playerid][pAdmin] = strval(field);
mysql_fetch_field_row(field, "Vip");
PlayerInfo[playerid][pVip] = strval(field);
mysql_fetch_field_row(field, "Pos_x");
PlayerInfo[playerid][pPos_x] = strval(field);
mysql_fetch_field_row(field, "Pos_y");
PlayerInfo[playerid][pPos_y] = strval(field);
.
.
.
.
}
}
mysql_free_result();
}
Re: mysql server problem -
pantelimonfl - 20.07.2011
The new debug.txt
Код:
[23:32:05]
[23:32:05] ---------------------------
[23:32:05] MySQL Debugging activated (07/20/11)
[23:32:05] ---------------------------
[23:32:05]
[23:32:05] >> mysql_connect( )
[23:32:05] CMySQLHandler::CMySQLHandler() - constructor called.
[23:32:05] CMySQLHandler::CMySQLHandler() - Connecting to "localhost" | DB: "samp" | Username: "root" ...
[23:32:05] CMySQLHandler::Connect() - Connection was successful.
[23:32:05] CMySQLHandler::Connect() - Auto-Reconnect has been enabled.
[23:32:05] >> mysql_ping( Connection handle: 1 )
[23:32:05] CMySQLHandler::Ping() - Connection is still alive.
[23:32:32] >> mysql_ping( Connection handle: 1 )
[23:32:32] CMySQLHandler::Ping() - Connection is still alive.
[23:32:32] >> mysql_real_escape_string( Connection handle: 1 )
[23:32:32] CMySQLHandler::EscapeString(Larry_Dee); - Escaped 9 characters to Larry_Dee.
[23:32:32] >> mysql_query( Connection handle: 1 )
[23:32:32] CMySQLHandler::Query(SELECT `id` FROM `players` WHERE LOWER(Name) = LOWER('Larry_Dee') LIMIT 1) - Successfully executed.
[23:32:32] >> mysql_store_result( Connection handle: 1 )
[23:32:32] CMySQLHandler::StoreResult() - Result was stored.
[23:32:32] >> mysql_num_rows( Connection handle: 1 )
[23:32:32] CMySQLHandler::NumRows() - Returned 1 row(s)
[23:32:32] >> mysql_fetch_row_format( Connection handle: 1 )
[23:32:32] CMySQLHandler::FetchRow() - Return: 1
[23:32:32] >> mysql_query( Connection handle: 1 )
[23:32:32] CMySQLHandler::Query(SELECT Lock FROM players WHERE id = 1 LIMIT 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 'Lock FROM players WHERE id = 1 LIMIT 1' at line 1)
[23:32:32] >> mysql_store_result( Connection handle: 1 )
[23:32:32] CMySQLHandler::StoreResult() - No data to store.
[23:32:32] >> mysql_fetch_row_format( Connection handle: 1 )
[23:32:32] CMySQLHandler::FetchRow() - You cannot call this function now. (Reason: Empty Result)
[23:32:35] >> mysql_ping( Connection handle: 1 )
[23:32:35] CMySQLHandler::Ping() - Connection is still alive.
[23:32:35] >> mysql_query( Connection handle: 1 )
[23:32:35] CMySQLHandler::Query(SELECT Password FROM players WHERE id = 1 LIMIT 1) - Successfully executed.
[23:32:35] >> mysql_store_result( Connection handle: 1 )
[23:32:35] CMySQLHandler::StoreResult() - Result was stored.
[23:32:35] >> mysql_fetch_row_format( Connection handle: 1 )
[23:32:35] CMySQLHandler::FetchRow() - Return: asd
[23:32:38] >> mysql_ping( Connection handle: 1 )
[23:32:38] CMySQLHandler::Ping() - Connection is still alive.
[23:32:38] >> mysql_query( Connection handle: 1 )
[23:32:38] CMySQLHandler::Query(SELECT Password FROM players WHERE id = 1 LIMIT 1) - Successfully executed.
[23:32:38] >> mysql_store_result( Connection handle: 1 )
[23:32:38] CMySQLHandler::StoreResult() - Result was stored.
[23:32:38] >> mysql_fetch_row_format( Connection handle: 1 )
[23:32:38] CMySQLHandler::FetchRow() - Return: asd
[23:32:38] >> mysql_query( Connection handle: 1 )
[23:32:38] CMySQLHandler::Query(SELECT * FROM `players`) - Successfully executed.
[23:32:39] >> mysql_store_result( Connection handle: 1 )
[23:32:39] CMySQLHandler::StoreResult() - Result was stored.
[23:32:39] >> mysql_num_rows( Connection handle: 1 )
[23:32:39] CMySQLHandler::NumRows() - Returned 1 row(s)
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Level") -
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Money") -
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Admin") -
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Vip") -
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Pos_x") -
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Pos_y") -
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Pos_z") -
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Carkey") -
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Carkey2") -
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Carkey3") -
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Fcarkey") -
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Health") -
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Respect") -
[23:32:39] >> mysql_fetch_row_format( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchRow() - Return: 1|larry_dee|asd|3|5000000|10|0|111.805|-78.8418|2|0|0|0|0|0|0|0|0|0|0|100|0|0|0|0|0||0000-00-00||0|0|0|0
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Mask") - 0
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Maskuse") - 0
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Leader") - 0
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Member") - 0
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Char") - 0
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Int") - 0
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("VirWorld") - 0
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Walkie") - 0
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Walkiefreq") -
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Lock") - 0
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Ban Reason") -
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Lock Date") - 0000-00-00
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Locked By") -
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Tut") - 0
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Sex") - 0
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Origin") - 0
[23:32:39] >> mysql_fetch_field_row( Connection handle: 1 )
[23:32:39] CMySQLHandler::FetchField("Age") - 0
[23:32:39] >> mysql_free_result( Connection handle: 1 )
[23:32:39] CMySQLHandler::FreeResult() - Result was successfully free'd.
[23:32:52] >> mysql_ping( Connection handle: 1 )
[23:32:52] CMySQLHandler::Ping() - Connection is still alive.
[23:32:52] >> mysql_real_escape_string( Connection handle: 1 )
[23:32:52] CMySQLHandler::EscapeString(a); - Escaped 1 characters to a.
[23:32:52] >> mysql_query( Connection handle: 1 )
[23:32:52] CMySQLHandler::Query(UPDATE players SET Password='a',Level=0,Money=0,Admin=0,Vip=0,Pos_x=1120486209,Pos_y=-1038322018,Pos_z=1067397641,Carkey=0,Carkey2=0,Carkey3=0,Fcarkey=0,Leader=0,Member=0,Rank=0,Char=0,VirWorld=0,Int=0,Health=1120403456 WHERE id=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 'Char=0,VirWorld=0,Int=0,Health=1120403456 WHERE id=1' at line 1)
[23:32:52] >> mysql_query( Connection handle: 1 )
[23:32:52] CMySQLHandler::Query(UPDATE players SET Mask=0,Maskuse=0,Walkie=0,Wtfreq=0,Lock=0,Ban Reason=0,Lock Date=0,Locked By=0,Tut=0,Sex=0,Origin=0,Age=0 WHERE id=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 'Lock=0,Ban Reason=0,Lock Date=0,Locked By=0,Tut=0,Sex=0,Origin=0,Age=0 WHERE id=' at line 1)
[23:32:57] CMySQLHandler::~CMySQLHandler() - deconstructor called.
[23:32:57] CMySQLHandler::FreeResult() - The result is already empty.
[23:32:57] CMySQLHandler::Disconnect() - Connection was closed.
Re: mysql server problem -
Grim_ - 20.07.2011
Somewhere in the code (which cannot be determined with the code here), you do not add ` around the table name "players". Do so, and you'll remove the other two errors that appear in your log.
Re: mysql server problem -
pantelimonfl - 20.07.2011
The new
Код:
[23:49:16]
[23:49:16] ---------------------------
[23:49:16] MySQL Debugging activated (07/20/11)
[23:49:16] ---------------------------
[23:49:16]
[23:49:16] >> mysql_connect( )
[23:49:16] CMySQLHandler::CMySQLHandler() - constructor called.
[23:49:16] CMySQLHandler::CMySQLHandler() - Connecting to "localhost" | DB: "samp" | Username: "root" ...
[23:49:16] CMySQLHandler::Connect() - Connection was successful.
[23:49:16] CMySQLHandler::Connect() - Auto-Reconnect has been enabled.
[23:49:16] >> mysql_ping( Connection handle: 1 )
[23:49:16] CMySQLHandler::Ping() - Connection is still alive.
[23:49:55] >> mysql_ping( Connection handle: 1 )
[23:49:55] CMySQLHandler::Ping() - Connection is still alive.
[23:49:55] >> mysql_real_escape_string( Connection handle: 1 )
[23:49:55] CMySQLHandler::EscapeString(Larry_Dee); - Escaped 9 characters to Larry_Dee.
[23:49:55] >> mysql_query( Connection handle: 1 )
[23:49:55] CMySQLHandler::Query(SELECT `id` FROM `players` WHERE LOWER(Name) = LOWER('Larry_Dee') LIMIT 1) - Successfully executed.
[23:49:55] >> mysql_store_result( Connection handle: 1 )
[23:49:55] CMySQLHandler::StoreResult() - Result was stored.
[23:49:55] >> mysql_num_rows( Connection handle: 1 )
[23:49:55] CMySQLHandler::NumRows() - Returned 1 row(s)
[23:49:55] >> mysql_fetch_row_format( Connection handle: 1 )
[23:49:55] CMySQLHandler::FetchRow() - Return: 1
[23:49:55] >> mysql_query( Connection handle: 1 )
[23:49:55] CMySQLHandler::Query(SELECT Lock FROM `players` WHERE id = 1 LIMIT 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 'Lock FROM `players` WHERE id = 1 LIMIT 1' at line 1)
[23:49:55] >> mysql_store_result( Connection handle: 1 )
[23:49:55] CMySQLHandler::StoreResult() - No data to store.
[23:49:55] >> mysql_fetch_row_format( Connection handle: 1 )
[23:49:55] CMySQLHandler::FetchRow() - You cannot call this function now. (Reason: Empty Result)
[23:49:57] >> mysql_ping( Connection handle: 1 )
[23:49:57] CMySQLHandler::Ping() - Connection is still alive.
[23:49:57] >> mysql_query( Connection handle: 1 )
[23:49:57] CMySQLHandler::Query(SELECT Password FROM `players` WHERE id = 1 LIMIT 1) - Successfully executed.
[23:49:57] >> mysql_store_result( Connection handle: 1 )
[23:49:57] CMySQLHandler::StoreResult() - Result was stored.
[23:49:57] >> mysql_fetch_row_format( Connection handle: 1 )
[23:49:57] CMySQLHandler::FetchRow() - Return: asd
[23:49:57] >> mysql_query( Connection handle: 1 )
[23:49:57] CMySQLHandler::Query(SELECT * FROM `players`) - Successfully executed.
[23:49:57] >> mysql_store_result( Connection handle: 1 )
[23:49:57] CMySQLHandler::StoreResult() - Result was stored.
[23:49:57] >> mysql_num_rows( Connection handle: 1 )
[23:49:57] CMySQLHandler::NumRows() - Returned 1 row(s)
[23:49:57] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:57] CMySQLHandler::FetchField("Level") -
[23:49:57] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:57] CMySQLHandler::FetchField("Money") -
[23:49:57] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Admin") -
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Vip") -
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Pos_x") -
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Pos_y") -
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Pos_z") -
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Carkey") -
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Carkey2") -
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Carkey3") -
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Fcarkey") -
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Health") -
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Respect") -
[23:49:58] >> mysql_fetch_row_format( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchRow() - Return: 1|larry_dee|asd|3|5000000|10|0|111.805|-78.8418|2|0|0|0|0|0|0|0|0|0|0|100|0|0|0|0|0||0000-00-00||0|0|0|0
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Mask") - 0
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Maskuse") - 0
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Leader") - 0
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Member") - 0
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Char") - 0
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Int") - 0
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("VirWorld") - 0
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Walkie") - 0
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Walkiefreq") -
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Lock") - 0
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Ban Reason") -
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Lock Date") - 0000-00-00
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Locked By") -
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Tut") - 0
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Sex") - 0
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Origin") - 0
[23:49:58] >> mysql_fetch_field_row( Connection handle: 1 )
[23:49:58] CMySQLHandler::FetchField("Age") - 0
[23:49:58] >> mysql_free_result( Connection handle: 1 )
[23:49:58] CMySQLHandler::FreeResult() - Result was successfully free'd.
[23:50:18] >> mysql_ping( Connection handle: 1 )
[23:50:18] CMySQLHandler::Ping() - Connection is still alive.
[23:50:18] >> mysql_real_escape_string( Connection handle: 1 )
[23:50:18] CMySQLHandler::EscapeString(a); - Escaped 1 characters to a.
[23:50:18] >> mysql_query( Connection handle: 1 )
[23:50:18] CMySQLHandler::Query(UPDATE `players` SET Password='a',Level=0,Money=0,Admin=0,Vip=0,Pos_x=1110290096,Pos_y=1115890745,Pos_z=1076627572,Carkey=0,Carkey2=0,Carkey3=0,Fcarkey=0,Leader=0,Member=0,Rank=0,Char=0,VirWorld=0,Int=0,Health=1120403456 WHERE id=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 'Char=0,VirWorld=0,Int=0,Health=1120403456 WHERE id=1' at line 1)
[23:50:18] >> mysql_query( Connection handle: 1 )
[23:50:18] CMySQLHandler::Query(UPDATE `players` SET Mask=0,Maskuse=0,Walkie=0,Wtfreq=0,Lock=0,Ban Reason=0,Lock Date=0,Locked By=0,Tut=0,Sex=0,Origin=0,Age=0 WHERE id=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 'Lock=0,Ban Reason=0,Lock Date=0,Locked By=0,Tut=0,Sex=0,Origin=0,Age=0 WHERE id=' at line 1)
[23:50:24] CMySQLHandler::~CMySQLHandler() - deconstructor called.
[23:50:24] CMySQLHandler::FreeResult() - The result is already empty.
[23:50:24] CMySQLHandler::Disconnect() - Connection was closed.
Re: mysql server problem -
Grim_ - 20.07.2011
There are errors occuring on the following lines that are executed in your script:
Код:
[23:49:55] CMySQLHandler::Query(SELECT Lock FROM `players` WHERE id = 1 LIMIT 1)
[23:50:18] CMySQLHandler::Query(UPDATE `players` SET Password='a',Level=0,Money=0,Admin=0,Vip=0,Pos_x=1110290096,Pos_y=1115890745,Pos_z=1076627572,Carkey=0,Carkey2=0,Carkey3=0,Fcarkey=0,Leader=0,Member=0,Rank=0,Char=0,VirWorld=0,Int=0,Health=1120403456 WHERE id=1)
[23:50:18] CMySQLHandler::Query(UPDATE `players` SET Mask=0,Maskuse=0,Walkie=0,Wtfreq=0,Lock=0,Ban Reason=0,Lock Date=0,Locked By=0,Tut=0,Sex=0,Origin=0,Age=0 WHERE id=1)
These could be caused by incorrect field names or other general SQL syntax errors.
Re: mysql server problem -
pantelimonfl - 20.07.2011
What can be the general errors?
Re: mysql server problem -
pantelimonfl - 21.07.2011
So, how can i read the data from the db?