SQL Problem.
#1

PHP код:
CMD:notice(playeridparams[])
{
    if(
isnull(params))
    {
        return 
SendClientMessage(playeridCOLOR_GREY"/notice [text]")
    }
    if(
pInfo[playerid][pNotice] == 1)
    {
        return 
SendClientMessage(playeridCOLOR_GREY"You've used your notice. Type /deletenotice to delete it.")
    }
    else
    {
        
pInfo[playerid][pNotice] = 1;
        new 
string[127];
        
format(stringsizeof(string), "You've set your notice to %s"params)
        
SendClientMessage(playeridCOLOR_WHITEstring)
        
mysql_format(db_infoquerysizeof(query), "UPDATE players SET noticetext = %s WHERE pid = %i"paramsGetPlayerDBId(playerid)); 
        
mysql_tquery(db_infoquery"""");
    }
return 
1;

Now if i try it in game it says
PHP код:
DescriptionUnknown column 'Test' in 'field list' (index 0). Query// TEST is the params the player putted at /notice
[22:58:47UPDATE players SET noticetext Test WHERE pid 
What's the problem :/?
Reply


Messages In This Thread
SQL Problem. - by AlexMSK - 11.01.2018, 00:30
Re: SQL Problem. - by Sew_Sumi - 11.01.2018, 02:14
Re: SQL Problem. - by X337 - 11.01.2018, 02:18
Re: SQL Problem. - by AlexMSK - 11.01.2018, 02:21
Re: SQL Problem. - by AlexMSK - 11.01.2018, 02:24

Forum Jump:


Users browsing this thread: 2 Guest(s)