MySQL Error" You have an error in your SQL syntax"

Hi, ich wollte mir gerade so einen Chatbot auf den Webserver hochladen und dazu muss ich so ein Script in MySQL ausführen. Wenn ich das in dem phpmyadmin hochlade kommt diese FehlermeldungL:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(14) NOT NULL, PRIMARY KEY (id), KEY botid (bot) )' at line 13
Das ist das Script

CREATE TABLE conversationlog( bot tinyint( 3 ) unsigned NOT NULL default '0', id int( 11 ) NOT NULL AUTO_INCREMENT , input text, response text, uid varchar( 255 ) default NULL , enteredtimetimestamp( 14 ) NOT NULL , PRIMARY KEY ( id ) , KEY botid( bot ) );
Was ist da falsch? hab nicht viel Ahnung von MySQL

Hi,

lies dir bitte unsere AGB durch…

Es ist ja kein Chat in dem Sinne. Außerdem braucht das doch nicht viel Performance

eine “Chatbox” ist vmtl. gleichzusetzen mit einer Shoutbox. Generell sind solche Scripts hier nicht erlaubt.

hola,

es hat nichts mit der Performance o.Ä. zu tun, es geht um die Anzahl offener Socketverbindungen, die bei so etwas hoch beansprucht werden.

ciao

Es ist doch nur für 1-2 Personen. Es soll ja keine Community werden. Ich will nur son kleinen Chatbot bauen, mit dem ich bisschen labern kann.

Hi,

Ausnahmen von der o. g. Regelung sind rein von der Bürokratie und der Fairness halber gegenüber den anderen Nutzern nicht machbar. Bitte habe Verständnis dafür.

[size=50][quote]Ich will nur son kleinen Chatbot bauen, mit dem ich bisschen labern kann.[/quote]such dir freunde … :wink:[/size]
diskutier jetz lieber nich rum, so sin nun mal die regeln. man kann hier nicht für jeden iwelche sonderregelungen und ausnahmen machen, das funktioniert einfach nicht.
gruß

edit… zu lahm…

Oder such dir einen Chatbot, der keine Datenbank benötigt. Falls das erlaubt ist (?).

is doch egal obber über datein oder sonst was läuft, die belastung für den server bleibt bestehen. es wäre egal, wenn der extern laufen würde und nur eingebunden werden würde, andernfalls geht es einfach nich.

Mit offenen Sockets sind doch Datenbanksockets gemeint? Dann hakt es an der Begründung :smiley:

Bürokratie.

Gekauft :unamused:

ok dann darf ich es hier also nicht. An was liegt es denn, dass dieser Fehler kommt?
Dann mach ich auf meinem privaten Rechner eben nen Server.

Daran, dass in dieser Zeile

enteredtimetimestamp( 14 ) NOT NULL ,

die Angabe des Spaltentyps fehlt, und nur der eher ungewöhnliche Spaltenname enteredtimetimestamp dort steht :ps:

[code]CREATE TABLE bots (
id tinyint(3) unsigned NOT NULL auto_increment,
botname varchar(255) NOT NULL default ‘’,
PRIMARY KEY (botname),
KEY id (id)
);

--------------------------------------------------------

Table structure for table conversationlog

CREATE TABLE conversationlog (
bot tinyint(3) unsigned NOT NULL default ‘0’,
id int(11) NOT NULL auto_increment,
input text,
response text,
uid varchar(255) default NULL,
enteredtime timestamp(14) NOT NULL,
PRIMARY KEY (id),
KEY botid (bot)
);

--------------------------------------------------------

Table structure for table dstore

CREATE TABLE dstore (
uid varchar(255) default NULL,
name text,
value text,
enteredtime timestamp(14) NOT NULL,
id int(11) NOT NULL auto_increment,
PRIMARY KEY (id),
KEY nameidx (name(40))
);

--------------------------------------------------------

Table structure for table gmcache

CREATE TABLE gmcache (
id int(11) NOT NULL auto_increment,
bot tinyint(3) unsigned NOT NULL default ‘0’,
template int(11) NOT NULL default ‘0’,
inputstarvals text,
thatstarvals text,
topicstarvals text,
patternmatched text,
inputmatched text,
combined text NOT NULL,
PRIMARY KEY (id),
KEY combined (bot,combined(255))
);

--------------------------------------------------------

Table structure for table gossip

CREATE TABLE gossip (
bot tinyint(3) unsigned NOT NULL default ‘0’,
gossip text,
id int(11) NOT NULL auto_increment,
PRIMARY KEY (id),
KEY botidx (bot)
);

--------------------------------------------------------

Table structure for table patterns

CREATE TABLE patterns (
bot tinyint(3) unsigned NOT NULL default ‘0’,
id int(11) NOT NULL auto_increment,
word varchar(255) default NULL,
ordera tinyint(4) NOT NULL default ‘0’,
parent int(11) NOT NULL default ‘0’,
isend tinyint(4) NOT NULL default ‘0’,
PRIMARY KEY (id),
KEY wordparent (parent,word),
KEY botid (bot)
);

--------------------------------------------------------

Table structure for table templates

CREATE TABLE templates (
bot tinyint(3) unsigned NOT NULL default ‘0’,
id int(11) NOT NULL default ‘0’,
template text NOT NULL,
pattern varchar(255) default NULL,
that varchar(255) default NULL,
topic varchar(255) default NULL,
PRIMARY KEY (id),
KEY bot (id)
);

--------------------------------------------------------

Table structure for table thatindex

CREATE TABLE thatindex (
uid varchar(255) default NULL,
enteredtime timestamp(14) NOT NULL,
id int(11) NOT NULL auto_increment,
PRIMARY KEY (id)
);

--------------------------------------------------------

Table structure for table thatstack

CREATE TABLE thatstack (
thatid int(11) NOT NULL default ‘0’,
id int(11) NOT NULL auto_increment,
value varchar(255) default NULL,
enteredtime timestamp(14) NOT NULL,
PRIMARY KEY (id)
);

[/code]
Das ist der originale Code. was muss ich denn ändern, dass es funktioniert?

Der enthält den Fehler aber gar nicht.

Und er unterscheidet sich auch in genau dem angesprochenen Punkt von dem Code, den du uns eingangs gezeigt hast.

Denen einen hab ich auch aus dem Fehler von phpmyadmin rauskopiert.
wenn ich den Code so reinkopier, dann kommt der Fehler, den ich anfangs gepostet habe.

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(14) NOT NULL, PRIMARY KEY (id), KEY botid (bot) )' at line 13

Dann machst du entweder beim Kopieren was falsch - oder das Leerzeichen an der Stelle im Original-Code ist nicht wirklich ein Leerzeichen.

mehr als Strg+C und STRG+V kann ich ja wohl nicht machen. dann geh ich auf SQL und kopier es da rein.
Der ganz originale Code ist so

[code]CREATE TABLE bots (
id tinyint(3) unsigned NOT NULL auto_increment,
botname varchar(255) NOT NULL default ‘’,
PRIMARY KEY (botname),
KEY id (id)
) TYPE=MyISAM;

--------------------------------------------------------

Table structure for table conversationlog

CREATE TABLE conversationlog (
bot tinyint(3) unsigned NOT NULL default ‘0’,
id int(11) NOT NULL auto_increment,
input text,
response text,
uid varchar(255) default NULL,
enteredtime timestamp(14) NOT NULL,
PRIMARY KEY (id),
KEY botid (bot)
) TYPE=MyISAM;

--------------------------------------------------------

Table structure for table dstore

CREATE TABLE dstore (
uid varchar(255) default NULL,
name text,
value text,
enteredtime timestamp(14) NOT NULL,
id int(11) NOT NULL auto_increment,
PRIMARY KEY (id),
KEY nameidx (name(40))
) TYPE=MyISAM;

--------------------------------------------------------

Table structure for table gmcache

CREATE TABLE gmcache (
id int(11) NOT NULL auto_increment,
bot tinyint(3) unsigned NOT NULL default ‘0’,
template int(11) NOT NULL default ‘0’,
inputstarvals text,
thatstarvals text,
topicstarvals text,
patternmatched text,
inputmatched text,
combined text NOT NULL,
PRIMARY KEY (id),
KEY combined (bot,combined(255))
) TYPE=MyISAM;

--------------------------------------------------------

Table structure for table gossip

CREATE TABLE gossip (
bot tinyint(3) unsigned NOT NULL default ‘0’,
gossip text,
id int(11) NOT NULL auto_increment,
PRIMARY KEY (id),
KEY botidx (bot)
) TYPE=MyISAM;

--------------------------------------------------------

Table structure for table patterns

CREATE TABLE patterns (
bot tinyint(3) unsigned NOT NULL default ‘0’,
id int(11) NOT NULL auto_increment,
word varchar(255) default NULL,
ordera tinyint(4) NOT NULL default ‘0’,
parent int(11) NOT NULL default ‘0’,
isend tinyint(4) NOT NULL default ‘0’,
PRIMARY KEY (id),
KEY wordparent (parent,word),
KEY botid (bot)
) TYPE=MyISAM;

--------------------------------------------------------

Table structure for table templates

CREATE TABLE templates (
bot tinyint(3) unsigned NOT NULL default ‘0’,
id int(11) NOT NULL default ‘0’,
template text NOT NULL,
pattern varchar(255) default NULL,
that varchar(255) default NULL,
topic varchar(255) default NULL,
PRIMARY KEY (id),
KEY bot (id)
) TYPE=MyISAM;

--------------------------------------------------------

Table structure for table thatindex

CREATE TABLE thatindex (
uid varchar(255) default NULL,
enteredtime timestamp(14) NOT NULL,
id int(11) NOT NULL auto_increment,
PRIMARY KEY (id)
) TYPE=MyISAM;

--------------------------------------------------------

Table structure for table thatstack

CREATE TABLE thatstack (
thatid int(11) NOT NULL default ‘0’,
id int(11) NOT NULL auto_increment,
value varchar(255) default NULL,
enteredtime timestamp(14) NOT NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;[/code]
Aber wenn das Type=MyISAM drin ist, kommt dort auch eine Fehlermeldung, wenn ich das aber entferne, dann erstellt er wenigstens die Tabelle “Bots”

Edit:
Wenn ich dei zeile enteredtime timestamp(14) NOT NULL, entferne dann funktioiniert es. Ist die Zeile denn wichtig?