06.03.2010, 04:20
server keep crashing.
pawn code:
log:
any ideas?
pawn code:
pawn Код:
new playername[MAX_PLAYER_NAME], query[128];
GetPlayerName(playerid, playername, sizeof(playername));
format(query, sizeof(query), "SELECT * FROM `usuarios` WHERE UserName = '%s'", playername);
ConexionMySQL();
mysql_real_escape_string(playername, playername);
mysql_query(query);
mysql_store_result();
if(mysql_num_rows() == 1){
PlayerInfo[playerid][Registered] = 1;
}
else{
PlayerInfo[playerid][Registered] = 0;
}
mysql_store_result();
Код:
[02:11:25] Incoming connection: 127.1.1.1:2509 [02:11:25] [join] The_Chaoz has joined the server (0:127.1.1.1) [02:11:25] MySQL Error (0): 'mysql_store_result' called when result already stored. Please use 'mysql_free_result' first.. [02:11:25] MySQL Error (0): Could not execute query. 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 ''usuarios' WHERE UserName=The_Chaoz' at line 1.