SQL issues.
#6

Give this a whirl.

PHP Code:
format(querysizeof(query), "SELECT `user` FROM accounts WHERE `user`='%s' LIMIT 1"name);
mysql_query(query);
mysql_store_result();
if(
mysql_num_rows() > 0)
{
        
Player[playerid][Money] -= price;
        
format(stringsizeof(string), "[Contract] A contract for $%s has been added to your PDA. Please check it now."FormatNumber(price));
        
SendFactionMessage(2YELLOWstring);
        
SaveContract(pName(playerid), nameprice);
        
format(stringsizeof(string), "You have successfully placed a hit on %s for $%s."nameFormatNumber(price));
        
SendClientMessage(playeridYELLOWstring);
    return 
true;
}
else
{
    
SendClientMessage(playeridGREY"That name isn't in the database.");
    return 
true;

Reply


Messages In This Thread
SQL issues. - by JoelR - 30.12.2012, 06:45
Re: SQL issues. - by Abreezy - 30.12.2012, 06:56
Re: SQL issues. - by JoelR - 30.12.2012, 07:03
Re: SQL issues. - by Abreezy - 30.12.2012, 07:07
Re: SQL issues. - by JoelR - 30.12.2012, 07:08
Re: SQL issues. - by Peach - 30.12.2012, 10:39

Forum Jump:


Users browsing this thread: 3 Guest(s)