HELP MYSQL LOGIN!
#3

well you can use mysql_num_row like if your query is SELECT * FROM `players` WHERE Name = '%s' AND Password = '%s' LIMIT 1",pName,pass);

ADDED: Or method 2, with strcmp.
pawn Код:
new sql[512], row[128];
format(sql, sizeof(sql), "SELECT Password FROM players where Name = %s", PlayerName);
mysql_query(sql);
mysql_store_result();
mysql_fetch_row(row);
new PlayerPassword[128];
strmid(PlayerPassword, row, 0, strlen(row), 255);
mysql_free_result();
Now
if(strcmp(inputtext, PlayerPassword, true) == 0) { Login ok} else{ Failed }.
Reply


Messages In This Thread
HELP MYSQL LOGIN! - by Zafire2008 - 24.01.2010, 18:23
Re: HELP MYSQL LOGIN! - by Zafire2008 - 24.01.2010, 19:01
Re: HELP MYSQL LOGIN! - by Toney - 24.01.2010, 19:20
Re: HELP MYSQL LOGIN! - by Zafire2008 - 24.01.2010, 19:28
Re: HELP MYSQL LOGIN! - by Toney - 24.01.2010, 19:36
Re: HELP MYSQL LOGIN! - by Zafire2008 - 24.01.2010, 19:55
Re: HELP MYSQL LOGIN! - by Toney - 24.01.2010, 19:59
Re: HELP MYSQL LOGIN! - by Zafire2008 - 24.01.2010, 20:03
Re: HELP MYSQL LOGIN! - by Toney - 24.01.2010, 20:06
Re: HELP MYSQL LOGIN! - by Zafire2008 - 24.01.2010, 20:08

Forum Jump:


Users browsing this thread: 7 Guest(s)