Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Errors with Attrib Sets


mikan

Recommended Posts

Hello, I need some help with Attribute Sets contribution, please. When I run the SQL file to create 3 tables, it gives me an error:

 

ERROR 1067 (42000): Invalid default value for 'products_options_id'

 

I had to edit the sql file and insert "0"

 

# drop table products_attributes_sets;

CREATE TABLE products_attributes_sets (

products_attributes_sets_id int(11) NOT NULL auto_increment,

products_attributes_sets_name varchar(50) NOT NULL default '', <-- NOT NULL default '0',

products_options_id int (11) NOT NULL default '',

PRIMARY KEY (products_attributes_sets_id)

) TYPE=MyISAM;

 

Then it worked!

 

But, when I try to create a set, give it a name and hit save, I get an error message:

 

1264 - Out of range value adjusted for column 'products_attributes_sets_id' at row 1

 

insert into products_attributes_sets (products_attributes_sets_id, products_attributes_sets_name, products_options_id) values ('','test',1)

 

At this point my knowledge stops, I don't know where to go to check things. I'm running PHP 5.1.1, MySQL 5.0 and OSC 2.2ms2

 

I know how to edit things, manage MySQL tables, but I'm no programmer. Any help would be greatly appreciated.

 

Thank you,

 

Robert

Link to comment
Share on other sites

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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