MySql syntax err

software development

#1

Mostly got MySql working on my PeeCee. Tried to create a table in use on DH locally and the insert chokes on the first table. I tried cutting and pasting sections of my backup and every section inserts just fine, except the first table. The error:You have an error in your SQL syntax near 'events ( frfrom time default NULL, tto time default NULL, datumet varch' at line 1This inserts fine:

CREATE TABLE reminder ( id int(11) NOT NULL auto_increment, date varchar(7) default NULL, email varchar(255) default NULL, user varchar(20) default NULL, days varchar(7) default NULL, reday varchar(4) default NULL, PRIMARY KEY (id) ) TYPE=MyISAM;This fails with a syntax error (gosh it looks the same to me!):CREATE TABLE events ( frfrom time default NULL, tto time default NULL, datumet varchar(7) default NULL, dag varchar(4) default NULL, user varchar(20) default NULL, event text, untill varchar(7) default NULL, repeat varchar(7) default NULL, id int(11) NOT NULL auto_increment, home varchar(255) default NULL, email varchar(255) default NULL, PRIMARY KEY (id) ) TYPE=MyISAM;Ideas welcome.


#2

What version MySQL are you running? DreamHost is running MySQL 3.23.55 so I downloaded and installed 3.23.56 for Windows to try to avoid any major changes between releases. Your query works fine on my machine.


#3

The phpdev pkg says MySQL4. (I’ll verify when I get home.) I guess I might try and install the older version to better match. Before I do that I may try loading a few of the other dbs I use to see if maybe this is the only one v4 doesn’t like. This makes me nervous; if DH upgrades one fine day and all of a sudden my calendar script stops working. Eeek. (I am just a user not a developer so I simply pay (when necessary), install, and pray :slight_smile: