Mysql error

[code]CREATE TABLE vpu.co (

from TEXT NOT NULL ,
to TEXT NOT NULL ,
time DATETIME UNSIGNED NOT NULL ,
msg LONGTEXT NOT NULL
) ENGINE = MYISAM [/code]
bringt den fehler #1064:

[quote]#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 ‚UNSIGNED NOT NULL, msg LONGTEXT NOT NULL) ENGINE = MyISAM‘ at line 1
[/quote]
das kapier ich nicht(bin halt normal sterblich :ps: )
mfg

probier mal

ENGINE = 'MYISAM';

bringt auch den selben fehler…

DATETIME ist ein String, folglich kannst du auch kein UNSIGNED-Feld daraus machen.

aso… danke!

könnte man mit auto_increment einrichten, dass automatisch die aktuelle zeit und datum eingetragen wird? oder muss ich das manuell machen?

mfg Joey

ON UPDATE CURRENT_TIMESTAMP :wink:

ach jo,
danke…

du hast meinen error verkürzt :hail: :hail:

[code]CREATE TABLE vpu.co (

from TEXT NOT NULL ,
to TEXT NOT NULL ,
time DATETIME ON UPDATE CURRENT_TIMESTAMP NOT NULL ,
text LONGTEXT NOT NULL
) ENGINE = MYISAM [/code]
klappt auch nicht mit OM_UPDATE_CURRENT_TIMESTAMP
bin ich zu doof oder was?^^
mfg

Öhm nein, anscheinend ich. „ON UPDATE CURRENT_TIMESTAMP“ geht nur mit einem TIMESTAMP-Feld.

aso…
da bin ich beruhigt, gibts denn keine andere möglichkeit?
mfg

doch, du nimmst ein timestamp feld :smiley:

ja, so wars nicht gemeint :smiley:
ich möchte es eigentlich schon in einem DateTime feld ablegen…