[SQLite] INSERT INTO doesn't work properly.
#6

Quote:
Originally Posted by ChristolisTV
Посмотреть сообщение
Yes, my logs do say this message. And I think my SQL structure is fine. Here is the query on how I create my table:
PHP код:
db_queryDatabase"CREATE TABLE IF NOT EXISTS `Users` (Username, Password VARCHAR(64), IP, Job, Skin, X, Y, Z, Angle, Interior, Money, Health, Armor, AdminLevel, RegisterDate DEFAULT GETDATE());" ); 
Is this working ? It is completly false.
PHP код:
CREATE TABLE IF NOT EXISTS `Users` ( `IDINT NOT NULL , `UsernameVARCHAR(24NOT NULL , `IPVARCHAR(16NOT NULL , `JobINT NOT NULL , `SkinINT NOT NULL , `XFLOAT NOT NULL , `YFLOAT NOT NULL , `ZFLOAT NOT NULL , `AngleFLOAT NOT NULL , `InteriorINT NOT NULL , `MoneyINT NOT NULL , `HealthFLOAT NOT NULL , `ArmorFLOAT NOT NULL , `RegisterDateDATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP); 
If I'm wrong, I apologize then but I'm probably sure your query nonsense (and yes, you need an ID which will auto-increment to provide an unique ID for players).

Also, you forget to show what the query looks like after formatting like I asked for (print the string/query and show us here).
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)