13.12.2012, 11:07
Here bro...Check it
[/pawn]public MySQLCheckAccount(sqlplayersname[])
{
//FuncLog("MySQLCheckAccount");
new query[128];
new escstr[MAX_PLAYER_NAME];
mysql_real_escape_string(sqlplayersname, escstr);
format(query, sizeof(query), "SELECT `id` FROM `userinfo` WHERE LOWER(UserName) = LOWER('%s') LIMIT 1 ;", escstr);
mysql_query(query);
mysql_store_result();
if (mysql_num_rows()==0)
{
return 0;
}
else
{
new strid[32];
new intid;
mysql_fetch_row(strid);
intid = strval(strid);
return intid;
}
}[pawn]
[/pawn]public MySQLCheckAccount(sqlplayersname[])
{
//FuncLog("MySQLCheckAccount");
new query[128];
new escstr[MAX_PLAYER_NAME];
mysql_real_escape_string(sqlplayersname, escstr);
format(query, sizeof(query), "SELECT `id` FROM `userinfo` WHERE LOWER(UserName) = LOWER('%s') LIMIT 1 ;", escstr);
mysql_query(query);
mysql_store_result();
if (mysql_num_rows()==0)
{
return 0;
}
else
{
new strid[32];
new intid;
mysql_fetch_row(strid);
intid = strval(strid);
return intid;
}
}[pawn]