Jump to content

[SOLVED] Numpty needs help


hedgehogg

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/76414-solved-numpty-needs-help/
Share on other sites

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.