Re: Error in SQL syntax
Posted by:
wasis adi
Date: March 30, 2015 05:48AM
Hi Peter,
This what the whole create table statement says:
Setting up database...
Connecting with the datbase server...
Successfully connected
Creating database named adrikunc_powdermaintenance...
Successfully created database adrikunc_powdermaintenance
Selecting adrikunc_powdermaintenance...
Successfully selected adrikunc_powdermaintenance
Creating Tables...
Successfully created table equipment
Failed to create table groups using SQl string:
CREATE TABLE groups ( uname varchar(20) NOT NULL default '', passwd varchar(12) NOT NULL default '', grp set('clerk','mechanic','lead','supervisor','manager') NOT NULL default '', last_login timestamp(14) NOT NULL ) ENGINE=MyISAM COMMENT='Table of groups of users';
MySQL reported the following error:
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 ) ENGINE=MyISAM COMMENT='Table of groups of users'' at line 5
and this is the syntax in setup.php :
$sql['make_tables']['equipment'] = "
CREATE TABLE equipment (
id int(11) NOT NULL auto_increment,
parent_id int(11) NOT NULL default '0',
description varchar(20) NOT NULL default '',
KEY id (id)
) ENGINE=MyISAM COMMENT='Pictsweet Equipment';";
$sql['make_tables']['groups'] = "
CREATE TABLE groups (
uname varchar(20) NOT NULL default '',
passwd varchar(12) NOT NULL default '',
grp set('clerk','mechanic','lead','supervisor','manager') NOT NULL default '',
last_login timestamp(14) NOT NULL
) ENGINE=MyISAM COMMENT='Table of groups of users';";