hey i'm try to creat a new table $sql = "CREATE TABLE web.chat (
id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
from VARCHAR(255) NOT NULL DEFAULT '',
to VARCHAR(255) NOT NULL DEFAULT '',
message TEXT NOT NULL,
sent DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
recd INTEGER UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (id)
)
ENGINE = InnoDB ;
";
and i get this error: check the manual that corresponds to your MySQL server version for the right syntax to use near 'from VARCHAR(255) NOT NULL DEFAULT '', to VARCHAR(255) NOT NULL DEFAULT '', ' at line 3
if i change "from" and "to" to another names it work but i need to keep this names.
thanks..
id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
from VARCHAR(255) NOT NULL DEFAULT '',
to VARCHAR(255) NOT NULL DEFAULT '',
message TEXT NOT NULL,
sent DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
recd INTEGER UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (id)
)
ENGINE = InnoDB ;
";
and i get this error: check the manual that corresponds to your MySQL server version for the right syntax to use near 'from VARCHAR(255) NOT NULL DEFAULT '', to VARCHAR(255) NOT NULL DEFAULT '', ' at line 3
if i change "from" and "to" to another names it work but i need to keep this names.
thanks..
Comment