SQLite not creating sql_sequence properly
#2

Quote:
Originally Posted by DarkLored
Посмотреть сообщение
I have been creating a filterscript and for some reason when I open the server it does not properly create the sql_sequence table and messes up my register system.

pawn Код:
LoadDatabase()
{
    new Query[800];
    AdminSys = db_open("darkadmin.db");
    strcat(Query, "CREATE TABLE IF NOT EXISTS users (userid INTEGER PRIMARY KEY AUTOINCREMENT, username VARCHAR(24) COLLATE NOCASE, password VARCHAR(129), admin INTEGER DEFAULT 0 NOT NULL,", sizeof(Query));
    strcat(Query, "score INTEGER DEFAULT 0 NOT NULL, money INTEGER DEFAULT 1000 NOT NULL, banned INTEGER DEFAULT 0 NOT NULL, ip VARCHAR(16) NOT NULL )", sizeof(Query));
    db_query(AdminSys, Query);
}
does anyone know why this is happening? help will be appreciated.
Hello, try with this query:
Код:
CREATE TABLE IF NOT EXISTS users (userid INTEGER PRIMARY KEY AUTO_INCREMENT, username VARCHAR(24), password VARCHAR(129), admin INTEGER DEFAULT 0 NOT NULL, score INTEGER DEFAULT 0 NOT NULL, money INTEGER DEFAULT 1000 NOT NULL, banned INTEGER DEFAULT 0 NOT NULL, ip VARCHAR(16) NOT NULL )
What could be the problem:

1) You've forgotten about underscore in AUTO_INCREMENT
2) 'NOCASE' was unknown collate

I've tried to run this query in my own MySQL server and it ran well.
Any other questions?

Greetings.
Reply


Messages In This Thread
SQLite not creating sql_sequence properly - by DarkLored - 25.08.2015, 17:22
Re: SQLite not creating sql_sequence properly - by LetsOWN[PL] - 25.08.2015, 17:40
Re: SQLite not creating sql_sequence properly - by DarkLored - 25.08.2015, 17:44
Re: SQLite not creating sql_sequence properly - by LetsOWN[PL] - 25.08.2015, 18:03
Re: SQLite not creating sql_sequence properly - by DarkLored - 25.08.2015, 23:29
Re: SQLite not creating sql_sequence properly - by DarkLored - 26.08.2015, 04:21
Re: SQLite not creating sql_sequence properly - by LetsOWN[PL] - 26.08.2015, 08:52
Re: SQLite not creating sql_sequence properly - by DarkLored - 26.08.2015, 16:28

Forum Jump:


Users browsing this thread: 1 Guest(s)