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
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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.