hedgehogg Posted November 7, 2007 Share Posted November 7, 2007 Hi all I am trying to install a nuke module in PHPNuke the SQL is ..... : CREATE TABLE nuke_staff ( id int(3) NOT NULL default '', sid int(3) NOT NULL auto_increment, name varchar(255) NOT NULL default '', des mediumtext NOT NULL, rank varchar(255) NOT NULL, alias varchar(255) NOT NULL default '', photo varchar(255) NOT NULL default '', PRIMARY KEY (sid), UNIQUE KEY sid (sid) ) TYPE=MyISAM; CREATE TABLE nuke_staff_config ( latest int(3) NOT NULL default '', img_url mediumtext NOT NULL, staff_join_page mediumtext NOT NULL, ranks int(3) NOT NULL default '', index_bl int(3) NOT NULL default '', copyright_txt mediumtext NOT NULL, ) TYPE=MyISAM; INSERT INTO nuke_staff_config ( latest, img_url, staff_join_page, ranks, index_bl, copyright_txt) VALUES ( '1', 'images/staff/', '', '1', '1', ' [center][color="#999999" size="1"]Staff v0.3 by [url="http://www.caffeine-junkies.com"]Caffeine Junkies[/url]. © 2004[/colour][/center] '); CREATE TABLE nuke_staff_cat ( id int(3) NOT NULL auto_increment, name varchar(255) NOT NULL default '', PRIMARY KEY (id), UNIQUE KEY id (id) ) TYPE=MyISAM; When I try to create the tables it comes up with these errors: CREATE TABLE nuke_staff MySQL said: Documentation #1067 - Invalid default value for 'id' CREATE TABLE nuke_staff_config MySQL said: Documentation #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 ') TYPE=MyISAM' at line 8 The insert data obviously cant be done as the table doesn't exist The final table goes in with no errors I would be pulling my hair out but i'm bald Any help is appreciated HoGG Quote Link to comment https://forums.phpfreaks.com/topic/76414-solved-numpty-needs-help/ Share on other sites More sharing options...
Barand Posted November 7, 2007 Share Posted November 7, 2007 1 ) id is integer so default value needs to be an integer. 2 ) remove final comma Quote Link to comment https://forums.phpfreaks.com/topic/76414-solved-numpty-needs-help/#findComment-387004 Share on other sites More sharing options...
hedgehogg Posted November 7, 2007 Author Share Posted November 7, 2007 So the first table would read CREATE TABLE nuke_staff ( id int(3) NOT NULL default '' sid int(3) NOT NULL auto_increment, name varchar(255) NOT NULL default '' des mediumtext NOT NULL, rank varchar(255) NOT NULL, alias varchar(255) NOT NULL default '' photo varchar(255) NOT NULL default '' PRIMARY KEY (sid), UNIQUE KEY sid (sid) ) TYPE=MyISAM; Sorry Barand not my line this mysql but I get by in the main HoGG Quote Link to comment https://forums.phpfreaks.com/topic/76414-solved-numpty-needs-help/#findComment-387161 Share on other sites More sharing options...
Barand Posted November 7, 2007 Share Posted November 7, 2007 id int(3) NOT NULL default 0 Quote Link to comment https://forums.phpfreaks.com/topic/76414-solved-numpty-needs-help/#findComment-387179 Share on other sites More sharing options...
hedgehogg Posted November 8, 2007 Author Share Posted November 8, 2007 Thanks Barand thats done the trick HoGG Quote Link to comment https://forums.phpfreaks.com/topic/76414-solved-numpty-needs-help/#findComment-387670 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.