Quote:
Originally Posted by [Bios]Marcel
Here you go, Mr. Lead Scripter:
PHP код:
new queryS[128];
mysql_format(register, queryS, sizeof(queryS), "SELECT Password FROM accounts WHERE Name = '%e' LIMIT 1;", GetName(playerid));
new Cache:resultsX = mysql_query(register, queryS);
new rows;
cache_get_row_count(rows);
if(rows)
{
cache_get_value_name(0, "Password", PlayerInfo[playerid][Password]);
cache_delete(resultsX);
ShowPlayerDialog(playerid, Login+200, DIALOG_STYLE_INPUT, "Login", "Welcome !\nthis account already registred. Please fill in your password:", "Login", "Quit");
}
else
{
isGuest[playerid] = 1;
}
return 1;
}
And yes, your code will still fail i guess, anyways, use mysql_errno() to check if u get any errors and check your mysql log.
Btw you might not want to use Limit 1 in that case, since it should be impossible to get more than 1, if u get more, you have a defect in your register system 
|
It's always good to use LIMIT 1, so it will return only 1 result.