24.01.2010, 12:27
Код:
case LOGIN_THREAD_ID:
{
if(IsPlayerConnected(LOGIN_PLAYER_ID))
{
mysql_store_result();
new resultline[64],fetch[64];
if(mysql_fetch_row_format(resultline))
{
mysql_fetch_field_row(fetch,"AdminLevel"); PlayerInfo[LOGIN_PLAYER_ID][pAdmin] = strval(fetch);
PlayerInfo[LOGIN_PLAYER_ID][pAdmin] = mysql_fetch_int();
LoggedIn[LOGIN_PLAYER_ID] = true;
format(string,sizeof(string),">> You have been successfully logged in. (Money: %d)",PlayerInfo[LOGIN_PLAYER_ID][pAdmin]);
SendClientMessage(LOGIN_PLAYER_ID,COLOR_GREEN,string);
mysql_free_result();
}
/*else
{
Wrongattempt[LOGIN_PLAYER_ID] += 1;
printf("Bad log in attempt by %s (Total attempts: %d)",pName,Wrongattempt[LOGIN_PLAYER_ID]);
if(Wrongattempt[LOGIN_PLAYER_ID] >= 3)
{
mysql_free_result();
return Kick(LOGIN_PLAYER_ID);
}
mysql_free_result();
}*/
}
Quote:
|
14:22:55] --------------------------- [14:22:55] MySQL Debugging activated (01/24/10) [14:22:55] --------------------------- [14:22:55] [14:22:55] mysql_connect("127.0.0.1","root","wcf","xxxxxx"); [14:22:55] MySQL connection has been established [14:22:55] mysql_stat(); Return "Uptime: 18809 Threads: 1 Questions: 358 Slow queries: 0 Opens: 221 Flush tables: 1 Open tables: 0 Queries per second avg: 0.19" [14:24:36] mysql_ping(); Return: 1 [14:24:36] mysql_query("SELECT * FROM `wcf1_user` WHERE username = 'Dwayne_Johnsol'",Resultid: 1); [14:24:36] New thread created (Thread ID: 572 | Result ID: 1 | Threadsafe: Yes) [14:24:36] mysql_store_result(); [14:24:36] mysql_num_rows(); Return: 1 [14:24:36] mysql_free_result(); [14:24:52] mysql_ping(); Return: 1 [14:24:52] mysql_real_escape_string(Dwayne_Johnsol); Escaped 14 characters [14:24:52] mysql_real_escape_string(xxxx); Escaped 8 characters [14:24:52] mysql_query("SELECT * FROM `wcf1_user` WHERE username = 'Dwayne_Johnsol' AND password = 'xxxx' LIMIT 1",Resultid: 3); [14:24:52] New thread created (Thread ID: 592 | Result ID: 3 | Threadsafe: Yes) [14:24:52] mysql_store_result(); [14:24:52] mysql_fetch_row_format(Delimiter: |); Return: "5|Dwayne_Johnsol||xxxxx||0|0|0|0||0|||0||0|0|0|NU LL|0||0|0|0|0|0|NULL|NULL|1|0|1|0|NULL|20|5|1|0|0| 0|0|114|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0| 0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0| 0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0" |

