if(player_info[playerid][SEX] == 1) player_info[playerid][SKIN] = regmaleskins[newskinindex][random(4)];
            else player_info[playerid][SKIN] = regfemaleskin[newskinindex][random(2)];
            new Year, Mounth, Day;
            getdate(Year, Mounth, Day);
            new date[12];
            format(date, sizeof(date), "%02d,%02d.%d", Day, Mounth, Year);
            new ip[16];
            GetPlayerIp(playerid, ip, sizeof(ip));
            static const fmt_query[] = "INSERT INTO `account (`name`, `password`, `email`, `ref`, `sex`, `race`, `age`, `skin`, `regdata`, `regip`) VALUES ('%s', '%s', '%s', '%d', '%d', '%d', '%d', '%d', '%', '%')";
            new query[sizeof(fmt_query)+(-2+MAX_PLAYER_NAME)+(-2+64)+(-2+64)+(-2+8)+(-2+1)+(-2+1)+(-2+2)+(-2+3)+(-2+12)+(-2+15)];
            format(query, sizeof(query), fmt_query, player_info[playerid][NAME], player_info[playerid][PASSWORD], player_info[playerid][EMAIL], player_info[playerid][REF], player_info[playerid][SEX], player_info[playerid][RACE], player_info[playerid][AGE], player_info[playerid][SKIN], date, ip);
            mysql_query(dbHandle, query);


[ERROR] error #2013 while executing query "SELECT `id` FROM `account` WHERE `name` = 'Oleg_Orehov'": Lost connection to MySQL server during query (C:\Users\Admin\Desktop\сервер\gamemodes\new.pwn:100)
[00:29:05] [ERROR] error #1064 while executing query "INSERT INTO `account (`name`, `password`, `email`, `ref`, `sex`, `race`, `age`, `skin`, `regdata`, `regip`) VALUES ('Oleg_Orehov', 'oleg1003200569', '', '0', '1', '1', '21', '21', '', '')": 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 'name`, `password`, `email`, `ref`, `sex`, `race`, `age`, `skin`, `regdata`, `reg' at line 1 (C:\Users\Admin\Desktop\сервер\gamemodes\new.pwn:489)


БД: не реклама

Edited by John_Smit

Share this post

Link to post

1 answer to this question

  • 0

Нашел проблему.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0