new Query[700];
format(Query,sizeof(Query),"INSERT INTO `users` (`Name`, `RegisteredOn`, `RegisteredIP`, `LastLoggedIP`, `Password`, `Level`, `Banned`");
format(Query,sizeof(Query),"%s, `Donator`, `Score`, `Cash`, `Kills`, `Deaths`, `Skin`, `Muted`, `Autologin`, `TotalSeconds`,`TotalSpentTime`",Query);
format(Query,sizeof(Query),"%s, `LastSeen`) VALUES(`%s`,`%s`, `%s`, `%s`, `%e`, `%d`, `%d`,`%d`,`%d`,`%d`,`%d`,`%d`,`%d`,`%d`,`%d`,`%d`,`%s`,`%s`)",Query,PN(playerid), string,pIP,pIP,buf,0,0,0,1,1500,0,0,0,0,0,seconds,ConvertTime(seconds,mins,hour,day),str);
mysql_tquery(Mysql, Query, "OnAccountRegister", "i", playerid);
forward OnAccountRegister(playerid);
public OnAccountRegister(playerid)
{
printf("[Registration] New account registered. Database ID: ");
return true;
}
`%s`,`%s`, `%s`, `%s`, `%e`, `%d`, `%d`,`%d`,`%d`,`%d`,`%d`,`%d`,`%d`,`%d`,`%d`,`%d`,`%s`,`%s`
Use single quotes instead of ticks, on this code:
Код:
`%s`,`%s`, `%s`, `%s`, `%e`, `%d`, `%d`,`%d`,`%d`,`%d`,`%d`,`%d`,`%d`,`%d`,`%d`,`%d`,`%s`,`%s` |
[15:57:23] [ERROR] CMySQLQuery::Execute[OnAccountRegister(i)] - (error #1054) Unknown column 'Matteo' in 'field list'
[15:57:27] [ERROR] CMySQLQuery::Execute[()] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE `Name` = `Matteo`' at line 1
format(Query,sizeof(Query),"%s, `LastSeen`) VALUES(`%s`,`%s`, `%s`, `%s`, `%e`, `%d`, `%d`,`%d`,`%d`,`%d`,`%d`,`%d`,`%d`,`%d`,`%d`,`%d`,`%s`,`%s`)",Query,PN(playerid), string,pIP,pIP,buf,0,0,0,1,1500,0,0,0,0,0,seconds,ConvertTime(seconds,mins,hour,day),str,PN(playerid));
format(Query,sizeof(Query),"%s, `LastSeen`) VALUES('%s','%s', '%s', '%s', '%e', '%d', '%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%s','%s')",Query,PN(playerid), string,pIP,pIP,buf,0,0,0,1,1500,0,0,0,0,0,seconds,ConvertTime(seconds,mins,hour,day),str,PN(playerid));