[MSQL]How could i check if player is registered?
#3

Код:
ExistingAccount(playerid) //Check to see if the account is already registered.
{
	new query[124];
	format(query, sizeof(query), "SELECT * FROM accts WHERE username = '%s'", getName(playerid));
	mysql_query(query);
	mysql_store_result();
	
	if(mysql_num_rows() > 0)
	{
		mysql_free_result();
		return 1;	
	}
	mysql_free_result();	
	return 0;
}
You're going to have to set query to yours, and also I didn't do any string escaping, as this is from an old script but see above how to do so
Reply


Messages In This Thread
[MSQL]How could i check if player is registered? - by Type-R - 05.06.2011, 02:47
Re: [MSQL]How could i check if player is registered? - by Burridge - 05.06.2011, 07:52
Re: [MSQL]How could i check if player is registered? - by PrawkC - 05.06.2011, 09:58
Re: [MSQL]How could i check if player is registered? - by Calgon - 05.06.2011, 11:38
Re: [MSQL]How could i check if player is registered? - by Type-R - 05.06.2011, 15:48

Forum Jump:


Users browsing this thread: 2 Guest(s)