matthewholland Posted December 20, 2005 Posted December 20, 2005 I installed the 2.2 version last week, came across this problem. After the order has been completed and submitted, if you do not check the box that says "Please notify me of updates to the products I have selected below" and you press continue I get the following message "1264 - Out of range value adjusted for column 'products_id' at row 1 insert into products_notifications (products_id, customers_id, date_added) values ('', '4', now()) [TEP STOP] If I hit hte back button, check the box and hit continue, no error. but if I don't wan't product updates I get the error. If you know of a quick fix please write or email, thanks!
rkgraham Posted December 22, 2005 Posted December 22, 2005 I installed the 2.2 version last week, came across this problem. After the order has been completed and submitted, if you do not check the box that says "Please notify me of updates to the products I have selected below" and you press continue I get the following message "1264 - Out of range value adjusted for column 'products_id' at row 1 insert into products_notifications (products_id, customers_id, date_added) values ('', '4', now()) [TEP STOP] If I hit hte back button, check the box and hit continue, no error. but if I don't wan't product updates I get the error. If you know of a quick fix please write or email, thanks! I am also having the same issue. Spent many last 2 days trying to solve this but unfortunately I have not been able to come up with a solution as of yet. If anyone has any pointers it would be greatly appreciated.
rkgraham Posted December 22, 2005 Posted December 22, 2005 I am also having the same issue. Spent many last 2 days trying to solve this but unfortunately I have not been able to come up with a solution as of yet. If anyone has any pointers it would be greatly appreciated. The problem with this and other sections appears to relate more to MySQL than osCommerce. However it is much easier rectifying this in osCommerce. For this query, you need to make a change in the incudes/application_top.php lines 383 thru 393 as follows: for ($i=0, $n=sizeof($notify); $i<$n; $i++) { $check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $notify[$i] . "' and customers_id = '" . $customer_id . "'"); $check = tep_db_fetch_array($check_query); if ($check['count'] < 1) { if($notify[$i] <> '') { tep_db_query("insert into " . TABLE_PRODUCTS_NOTIFICATIONS . " (products_id, customers_id, date_added) values ('" . $notify[$i] . "', '" . $customer_id . "', now())"); } } } The other thing that needs to be changed, is you need to search and replace the *** values ('' *** command with *** values (NULL *** otherwise the auto-increment doesn't work and you get the same error with pretty much any table using this function.
♥Vger Posted December 23, 2005 Posted December 23, 2005 The problem was here: values ('', '4', now()) There was no product_id being inserted into the first set of apostrophies. I thought that Matthews problem began after restoring from a backup? Vger
csar Posted January 7, 2006 Posted January 7, 2006 It worked!!! I did not need to change values ('" for values (NULL
Recommended Posts
Archived
This topic is now archived and is closed to further replies.