user data won't save in database again..
#1

Hi, so I simply added some stuff to my SQLite saving system and it suddenly stopped working after adding the things up.

I got an idea of where the problem might be at but I can't seem to find the problem directly.
pawn Код:
Database = db_open("server.db");
    db_query(Database, "PRAGMA synchronous = OFF");
    new Query[500];
    strcat(Query, "CREATE TABLE IF NOT EXISTS `users` (`userid` INTEGER PRIMARY KEY AUTOINCREMENT,`username` VARCHAR(24) COLLATE NO CASE, `password` VARCHAR(129), `score` INTEGER NOT NULL DEFAULT 0,", sizeof(Query));
    strcat(Query, "`money` INTEGER NOT NULL DEFAULT 0,`admin` INTEGER NOT NULL DEFAULT 0, `vip` INTEGER NOT NULL DEFAULT 0, `kills` INTEGER NOT NULL DEFAULT 0,", sizeof(Query));
    strcat(Query, "`deaths` INTEGER NOT NULL DEFAULT 0)", sizeof(Query));
    db_query(Database, Query);
Reply
#2

bump. Anyone has any idea how to fix this problem?
Reply
#3

It's COLLATE NOCASE, you have a space between NO CASE.

Moreover, remove ` ` around fields so you can reduce the query, they are not needed.
Reply
#4

Thanks, Konstanitinos. +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)