16.09.2011, 12:39
(
Последний раз редактировалось Lorenc_; 16.09.2011 в 15:47.
)
ALL HAIL ****** FOR WHIRLPOOL!
new
escPass[45];
mysql_real_escape_string(inputtext, escPass);
format(Query, 200, "SELECT * FROM player_data WHERE `NAME` = '%s' AND `PASSWORD` = md5('%s')", ReturnPlayerName(playerid), escPass);
mysql_query(Query);
mysql_store_result();
if(mysql_num_rows() > 0)
{
// Account matched Username's and hashed password
// Load info
mysql_free_result();
}
else
{
// Account login was incorrect.
}
pawn Код:
|
[01:25:10] [01:25:10] --------------------------- [01:25:10] MySQL Debugging activated (09/17/11) [01:25:10] --------------------------- [01:25:10] [01:25:10] >> mysql_connect( ) [01:25:10] CMySQLHandler::CMySQLHandler() - constructor called. [01:25:10] -- Connecting to "127.0.0.1" | DB: "blackops" | Username: "root" ... [01:25:10] CMySQLHandler::Connect() - Connection was successful. [01:25:10] >> mysql_query( Connection handle: 1 ) [01:25:10] CMySQLHandler::Query(CREATE TABLE IF NOT EXISTS PLAYER_DATA(.....) [01:25:41] >> mysql_query( Connection handle: 1 ) [01:25:41] CMySQLHandler::Query(SELECT * FROM `player_data` WHERE NAME = 'Lorenc' LIMIT 1) - Successfully executed. [01:25:41] >> mysql_store_result( Connection handle: 1 ) [01:25:41] CMySQLHandler::StoreResult() - Result was stored. [01:25:41] >> mysql_num_rows( Connection handle: 1 ) [01:25:41] CMySQLHandler::NumRows() - Returned 0 rows(s) [01:25:41] >> mysql_free_result( Connection handle: 1 ) [01:25:41] CMySQLHandler::FreeResult() - Result was successfully free'd. [01:25:45] >> mysql_real_escape_string( Connection handle: 1 ) [01:25:45] CMySQLHandler::EscapeString(test); - Escaped 4 characters to test. [01:25:45] >> mysql_query( Connection handle: 1 ) [01:25:45] CMySQLHandler::Query(INSERT INTO player_data......) - Successfully executed. [01:25:46] >> mysql_real_escape_string( Connection handle: 1 ) [01:25:46] CMySQLHandler::EscapeString(test); - Escaped 4 characters to test. [01:25:46] >> mysql_query( Connection handle: 1 ) [01:25:46] CMySQLHandler::Query(SELECT * FROM player_data WHERE `NAME` = 'Lorenc' AND `PASSWORD` = SHA1('test')) - Successfully executed. [01:25:46] >> mysql_store_result( Connection handle: 1 ) [01:25:46] CMySQLHandler::StoreResult() - Result was stored. [01:25:46] >> mysql_num_rows( Connection handle: 1 ) [01:25:46] CMySQLHandler::NumRows() - Returned 0 rows(s)