Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Attributes Error


Brunswick

Recommended Posts

Posted

I'm not sure where to look for an answer to this one.

 

I'm just beginning to set up attributes for some of my products and right out of the gate I run into a problem. After I hit "Insert" it goes to the following page:

 

/catalog/admin/products_attributes.php?action=add_product_attributes&option_page=1&value_page=1&attribute_page=1

 

and then shows the following message:

 

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

 

insert into products_attributes values ('', '36', '6', '15', '1.49', '+')

 

Does anyone have any idea what went wrong? Did I miss a setting in configuration or what? I'm developing this in localhost on my own computer.

 

-Hank :huh:

Posted
I'm just beginning to set up attributes for some of my products and right out of the gate I run into a problem. After I hit "Insert" it goes to the following page:

and then shows the following message:

 

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

 

insert into products_attributes values ('', '36', '6', '15', '1.49', '+')

 

Does anyone have any idea what went wrong?

Most likely a MySQL issue. Try changing line 61 in admin/products_attributes.php from:

tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values ('', '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "')");

to:

tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values (NULL, '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "')");

Probably you will be fine after that.

Posted
Probably you will be fine after that.

Hello Jan,

 

Thank you for the input. Promptly made the change you suggested and it did change the error message to:

 

1054 - Unknown column 'NUL' in 'field list'

 

insert into products_attributes values (NUL, '36', '6', '15', '1.49', '+')

 

I'm not sure what that means but hopefully you do. :)

 

I've not made any alteration to the database that I know, and all the other entries worked fine. :huh:

 

-Hank

Posted
Promptly made the change you suggested and it did change the error message to:

 

1054 - Unknown column 'NUL' in 'field list'

 

insert into products_attributes values (NUL, '36', '6', '15', '1.49', '+')

 

I'm not sure what that means but hopefully you do. :)

It means you changed the '' to NUL but it should have been NULL.

 

Very different meaning :)

Posted
It means you changed the '' to NUL but it should have been NULL.

 

Very different meaning :)

 

Hello Again,

 

You were absolutely right, of course! (Sometimes the little hamster falls asleep at the wheel! :) ) Anyway, making that correction fixed the problem.

 

I'm just getting my feet wet, learning all about the mysteries of MySQL (along with PHP on my own Apache server software) and I did notice while working my way through the MySQL tutorial that where they suggested I should see the value "NULL" it was just blank. Since this did not affect anything, I ignored it but I thought it might have something to do with different versions of the MySQL server.

 

Anyway, thank you very much for your help and your good humor. :thumbsup:

 

-Hank

  • 2 months later...
Posted

I am getting a similar error on the categories.php page.

 

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

 

insert into categories (sort_order, parent_id, date_added) values ('', '0', now())

 

[TEP STOP]

 

I have done similar changes to the code as you recommended, with no results. Any ideas?

Archived

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

×
×
  • Create New...