Command help
#2

sscanf utilisation must be: "intenger string" because a string can be anything.
PHP код:
sscanf(params"s[30]ds[30]"factionnameranknewrankname)) 
become
PHP код:
sscanf(params"ds[30]s[30]"rankfactionnamenewrankname)) 
PHP код:
    format(querysizeof(query), "UPDATE `Factions` SET `Name` = '%s', Rank1 = '%s'"factionnamenewrankname);
    
mysql_tquery(g_SQLquery); 
Assuming you are using the latest MySQL version, you have to use '%e' specifier to escape string and avoid SQL injections. To use this special specifier, you need to use the function mysql_format.
Your query become better
PHP код:
    mysql_format(querysizeof(query), "UPDATE `Factions` SET `Name` = '%e', Rank1 = '%e'"factionnamenewrankname);
    
mysql_tquery(g_SQLquery); 
You are missing a WHERE clause in your query. I advice you to lear a bit SQL language before using it: https://www.w3schools.com/sql/sql_update.asp
Reply


Messages In This Thread
Command help - by KinderClans - 27.09.2018, 11:04
Re: Command help - by Dayrion - 27.09.2018, 11:17
Re: Command help - by KinderClans - 27.09.2018, 12:55
Re: Command help - by AlfaSufaIndo - 27.09.2018, 12:59
Re: Command help - by Dayrion - 27.09.2018, 13:07

Forum Jump:


Users browsing this thread: 1 Guest(s)