cknapp Posted December 30, 2007 Share Posted December 30, 2007 I can't seem to find the syntax error in these: mysql> CREATE TABLE users ( -> call varchar(15) default NULL, -> accesscode varchar(10) default '', -> accesscount int(11) NOT NULL default '0', -> name varchar(150) default NULL, -> qth varchar(254) default NULL, -> sig varchar(150) default NULL, -> email varchar(150) default NULL, -> phone varchar(150) default NULL, -> comments blob -> ) TYPE=MyISAM; ERROR 1064 (42000): 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 'call varchar(15) default NULL, accesscode varchar(10) default '', ac' at line 2 mysql> mysql> CREATE TABLE accesslog ( -> call varchar(15) default '0', -> accesstime datetime default '0000-00-00 00:00:00' -> ) TYPE=MyISAM; ERROR 1064 (42000): 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 'call varchar(15) default '0', accesstime datetime default '0000-00-00 00:00:00' at line 2 mysql> Quote Link to comment https://forums.phpfreaks.com/topic/83728-solved-mysql-syntax-help/ Share on other sites More sharing options...
PFMaBiSmAd Posted December 30, 2007 Share Posted December 30, 2007 call is a reserved word - http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html Use something else for a column name. Quote Link to comment https://forums.phpfreaks.com/topic/83728-solved-mysql-syntax-help/#findComment-426002 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.