help mysql
#5

Quote:
Originally Posted by Mencent
View Post
Hello!

PHP Code:
new qstr[100];
format(qstr,sizeof qstr,"SELECT * FROM `players` WHERE `username`='%s';",plname);
mysql_tquery(handle,qstr,"OnLoadPlayer","i",playerid);//handle is the connection handle, please adjust this
//at the end of the script:
forward OnLoadPlayer(playerid);
public 
OnLoadPlayer(playerid)
{
    if(!
cache_num_rows())return 1;
    
gPlayerAccount[playerid] = 1;
    return 
1;

Notice:


- Mencent
Use this, but replace Username='%s' with Username='%e' and replace format with mysql_format(handle, qstr
Reply


Messages In This Thread
help mysql - by Jimmi - 25.07.2015, 20:05
Re: help mysql - by Jimmi - 25.07.2015, 21:06
Re: help mysql - by TheSkyBlueTeam - 25.07.2015, 21:11
AW: help mysql - by Mencent - 25.07.2015, 21:26
Re: AW: help mysql - by J0sh... - 25.07.2015, 21:27

Forum Jump:


Users browsing this thread: 1 Guest(s)