Error ID: 1064, You have an error in your SQL syntax
#4

Quote:
Originally Posted by Dziugsas
Посмотреть сообщение
pawn Код:
stock BanName(name[],reason[],admin[])
{
    new string[200];
    if(!IsBannedName(name))
    {
        new day, month, year, seconds, minutes, hours;
        gettime(hours,minutes,seconds);
        getdate(year,month,day);
        format(string, sizeof(string), "INSERT INTO BanNames (`Name`,`BanAdmin`,`BanReason`,`BanSeconds`,`BanMinutes`,`BanHours`,`BanDay`,`BanMonth`,`BanYear`) VALUE ('%s','%s','%s','%d','%d','%d','%d','%d','%d')",name,admin,reason,seconds,minutes,hours,day,month,year);
        mysql_query(string);
    }
    return true;
}
Here you go.Database name BanNames shouldn't be in ''.
That doesn't matter. It will work if it is or isn't, won't cause an error.
Reply


Messages In This Thread
Error ID: 1064, You have an error in your SQL syntax - by cickis3 - 13.11.2014, 18:39
Re: Error ID: 1064, You have an error in your SQL syntax - by TakeiT - 13.11.2014, 19:00
Re: Error ID: 1064, You have an error in your SQL syntax - by Dziugsas - 13.11.2014, 19:03
Re: Error ID: 1064, You have an error in your SQL syntax - by TakeiT - 13.11.2014, 19:20

Forum Jump:


Users browsing this thread: 1 Guest(s)