09.06.2017, 18:56
(
Последний раз редактировалось FailerZ; 09.06.2017 в 19:33.
)
Nevermind I figured it out
I used UPDATE instead of INSERT
So I tried to save a date in my SQLite database but when the player register and logins everything is fine until the player spawns. He got kicked and all his data record is not saved anymore.
Here in the database creation:
Here the saving:
I used UPDATE instead of INSERT
So I tried to save a date in my SQLite database but when the player register and logins everything is fine until the player spawns. He got kicked and all his data record is not saved anymore.
Here in the database creation:
Код HTML:
db_query(Database, "CREATE TABLE IF NOT EXISTS Accounts (columns, RegisterDate VARCHAR(40), columns)");
Код HTML:
new d, m, y, mname[12], alldate[40]; getdate(y, m, d); switch(m) { case 1: mname = "January"; case 2: mname = "February"; case 3: mname = "March"; case 4: mname = "April"; case 5: mname = "May"; case 6: mname = "June"; case 7: mname = "July"; case 8: mname = "August"; case 9: mname = "September"; case 10: mname = "October"; case 11: mname = "November"; case 12: mname = "December"; } format(alldate, sizeof(alldate), "%d-%s-%d", d, mname, y); format(Query, sizeof(Query), "INSERT INTO Accounts (RegisterDate) VALUES ('%s')", DB_Escape(alldate)); db_query(Database, Query);