• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Fix z_ots_comunication error on SQLite [SOLVED]

A3F

New Member
Joined
Jun 28, 2011
Messages
4
Reaction score
0
Hello everyone,

before anyone says something, I HAVE searched for this error and tried the fix i found but it doesn't work.
When i start the server I get that z_ots_communication error and when i try to execute this sql query:
SQL:
CREATE TABLE `z_ots_comunication` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL,
`type` varchar(255) NOT NULL,
`action` varchar(255) NOT NULL,
`param1` varchar(255) NOT NULL,
`param2` varchar(255) NOT NULL,
`param3` varchar(255) NOT NULL,
`param4` varchar(255) NOT NULL,
`param5` varchar(255) NOT NULL,
`param6` varchar(255) NOT NULL,
`param7` varchar(255) NOT NULL,
`delete_it` int(2) NOT NULL default '1',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
i get this error:
Code:
near "auto_increment": syntax error

what should i do ? i am using sqlite btw.

and thanks all in advance :)
 
Last edited:
Ok, Thanks everyone i managed to do it.

Sqlite doesn't use exactly the same syntax as mysql, so the query has to be adjusted. Here is the new SQLite compatible one:
SQL:
CREATE TABLE "z_ots_comunication" (
"id" INTEGER(11) PRIMARY KEY NOT NULL,
"name" VARCHAR(255) NOT NULL,
"type" VARCHAR(255) NOT NULL,
"action" VARCHAR(255) NOT NULL,
"param1" VARCHAR(255) NOT NULL,
"param2" VARCHAR(255) NOT NULL,
"param3" VARCHAR(255) NOT NULL,
"param4" VARCHAR(255) NOT NULL,
"param5" VARCHAR(255) NOT NULL,
"param6" VARCHAR(255) NOT NULL,
"param7" VARCHAR(255) NOT NULL,
"delete_it" INTEGER(2) NOT NULL DEFAULT "1"
)

If you whish to know what has been changed, Here is an interesting read on the main differences between mysql and sqlite: Convert MySQL Tables to SQLite Tables
 
Last edited:
Back
Top