johanbo Posted December 27, 2005 Share Posted December 27, 2005 First let me wish a very Happy New Year to all memebers of this forum! Now I need help; I am blocked at the insert of new product in catalog. I get following error message; 1264 - Out of range value adjusted for column 'manufacturers_id' at row 1 insert into products (products_quantity, products_model, products_price, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id, products_image, products_date_added) values ('1', 'str-9', '5.00', null, '100', '1', '1', '', '1-2_resize (3).jpg', now()) What's going on ? What's wrong? What shall I do to solve the problem? I will be very very grateful for soonest possible help. Thanks in advance. Johanbo I come from the North of Sweden but live in France since lany years. Link to comment Share on other sites More sharing options...
♥Vger Posted December 27, 2005 Share Posted December 27, 2005 Are you using the updated osCommerce 2.2 MS2 (available by following the "Latest News" link at the top of the forum homepage), or have you applied those updates to an existing MS2? The reason I ask is that the error you are getting is (I believe) a compatibility problem with MySQL 5 - which should clear by applying the update. Vger Link to comment Share on other sites More sharing options...
johanbo Posted December 28, 2005 Author Share Posted December 28, 2005 Are you using the updated osCommerce 2.2 MS2 (available by following the "Latest News" link at the top of the forum homepage), or have you applied those updates to an existing MS2? The reason I ask is that the error you are getting is (I believe) a compatibility problem with MySQL 5 - which should clear by applying the update. Vger Link to comment Share on other sites More sharing options...
johanbo Posted December 28, 2005 Author Share Posted December 28, 2005 Thanks for your answer. The update of osCommerce is installed, but I have still the same problem. Same error message when I try to insert new product. I find this strange as the preview is OK. What to do? I am very grateful to you to find the solution. Johanssonbo Link to comment Share on other sites More sharing options...
G & T Posted January 18, 2006 Share Posted January 18, 2006 Bo, did you manage to solve this ? I have the same problem and would appreciate any help with it! Link to comment Share on other sites More sharing options...
edmoore1 Posted July 7, 2007 Share Posted July 7, 2007 Thanks for your answer. The update of osCommerce is installed, but I have still the same problem. Same error message when I try to insert new product. I find this strange as the preview is OK. What to do? I am very grateful to you to find the solution. Johanssonbo OK... I've learned. The problem with this error and error 1264 - Out of range... is that those fields MUST have a number in them. So, here is some code that works. On a new product, it will set the defaults at '0' for the products quantity & products weight field. On an update, it will pull in the accurate information. I've also added *Required to those boxes so anyone who uses it knows they have to fill in the blank. Here is the code. Open admin/categories page. Find: $sort_order = tep_db_prepare_input($HTTP_POST_VARS['sort_order']); Add after that: if ($sort_order==''){$sort_order='0';} Find: <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, $pInfo->manufacturers_id); ?></td> Replace with: <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, $pInfo->manufacturers_id); ?> <font color="red">* Required</font></td> Find: <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_quantity', $pInfo->products_quantity); ?></td> Replace with: <td class="main"> <?php if ($pInfo->products_quantity==''){ echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_quantity', "0"); }else{ echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_quantity', $pInfo->products_quantity); } ?> <font color="red">* Required</font> </td> Find: <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_weight', $pInfo->products_weight); ?></td> Replace with: <td class="main"> <?php if ($pInfo->products_weight==''){ echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_weight', "0"); }else{ echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_weight', $pInfo->products_weight); } ?><font color="red"> * Required</font> </td> I hope this helps everyone out there that is looking for a remedy. Granted, it is not the best, but it works. Good luck! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.