Guest Posted December 18, 2005 Posted December 18, 2005 Hi again, Could someone please help me or tell me why everytime i try to restore my database i keep getting this error please? 1264 - Out of range value adjusted for column 'configuration_id' at row 1 insert into configuration values ('', 'Last Database Restore', 'DB_LAST_RESTORE', 'db_oscdb-20051126022208.sql', 'Last database restore file', '6', '', '', now(), '', '') [TEP STOP] Has anyone experience the same problem as me before, if so have you fixed it? Please hope you could help me? Best regards Kevin Doan
241 Posted December 18, 2005 Posted December 18, 2005 which version of oscommerce are you using as I do not recognise that line DB_LAST_RESTORE No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes.
Guest Posted December 18, 2005 Posted December 18, 2005 which version of oscommerce are you using as I do not recognise that line DB_LAST_RESTORE Hi thanks for your respond. i'm using this version osCommerce 2.2 Milestone 2 Update 051113. it was fine few days ago though, i tried to restore it was ok, no error or nothing, just yesterday i think. May i ask you taht do you know is there anyway to fix this problem or should is tart the whole website again? :( many thanks Kevin Doan
241 Posted December 18, 2005 Posted December 18, 2005 have you added contributions as there is no such entry as DB_LAST_RESTORE in the default copy of osCommerce 2.2 Milestone 2 Update 051113 oscommerce.sql The issue is with the part: values ('', 'La in that there is no id given in the first set of single quote marks here: ('', the default sql file does not have the column configuration_id example from the default sql file INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Store Name', 'STORE_NAME', 'osCommerce', 'The name of my store', '1', '1', now()); The line comes from admin/backup.php tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'DB_LAST_RESTORE'"); tep_db_query("insert into " . TABLE_CONFIGURATION . " values ('', 'Last Database Restore', 'DB_LAST_RESTORE', '" . $read_from . "', 'Last database restore file', '6', '', '', now(), '', '')"); so my suggestion would be to leave out that line from the file which you are restoring No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes.
Guest Posted December 18, 2005 Posted December 18, 2005 have you added contributions as there is no such entry as DB_LAST_RESTORE in the default copy of osCommerce 2.2 Milestone 2 Update 051113 oscommerce.sql The issue is with the part: values ('', 'La in that there is no id given in the first set of single quote marks here: ('', the default sql file does not have the column configuration_id example from the default sql file INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Store Name', 'STORE_NAME', 'osCommerce', 'The name of my store', '1', '1', now()); The line comes from admin/backup.php tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'DB_LAST_RESTORE'"); tep_db_query("insert into " . TABLE_CONFIGURATION . " values ('', 'Last Database Restore', 'DB_LAST_RESTORE', '" . $read_from . "', 'Last database restore file', '6', '', '', now(), '', '')"); so my suggestion would be to leave out that line from the file which you are restoring Wowowow.......thank you sooooo much for your help. I removed that line of code from my backup.php file tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = 'DB_LAST_RESTORE'"); tep_db_query("insert into " . TABLE_CONFIGURATION . " values ('', 'Last Database Restore', 'DB_LAST_RESTORE', '" . $read_from . "', 'Last database restore file', '6', '', '', now(), '', '')"); And now i can restore without any errors :) YIPPPIII. You are soo good :). Thank you thank you and thank you :). And all this morning i've been trying to fix this problem in my database lol. May i ask you also that would you happen to know also how can i fix this problem because it gives me a similar error everytime i click on PRODUCTS EXPECTED in admin configurations. The error says: 1292 - Incorrect datetime value: '' for column 'products_date_available' at row 59 update products set products_date_available = '' where to_days(now()) > to_days(products_date_available) [TEP STOP] Could you please tell me that is this problem has anything to do with my database or with my php files i.e backup.php ? Any help would be greatful, and i really appreciate any help. Best regards Kevin Doan
♥Vger Posted December 19, 2005 Posted December 19, 2005 As you've restored from a backup it may be that Products Expected (which must be in the future) are now actually in the past. I'd access the database via phpMyAdmin and clear the entries for the products_date_available table. Vger
Guest Posted December 19, 2005 Posted December 19, 2005 As you've restored from a backup it may be that Products Expected (which must be in the future) are now actually in the past. I'd access the database via phpMyAdmin and clear the entries for the products_date_available table. Vger Hi Vger, I don't know how to thank you enough and everyone else who have help me out :). This is so nice!!! It is so lovely to meet people with so much knowledge :). I got it fixed now, no more errors with PRODUCTS EXPECTED!!! Yahooo...this is so awesome. Thank you sooo much! Oh...do you think you can help me one more time hihi, please? I still have one more error left with similar issue. But unsure does it have to do with my database or with my php. files. The problem is that, it seems like when you buy a product at the end of the transaction, it force you to tick the box in "Please notify me of updates to the products I have selected below:" If i leave it unticked, and press CONTINUE i get this error :( 1264 - Out of range value adjusted for column 'products_id' at row 1 insert into products_notifications (products_id, customers_id, date_added) values ('', '9', now()) [TEP STOP] Could you please help me with this error, please? I really appreciate everything what you can help me :). Have a nice coldy day from London hi hi. Thanks in advance, Kevin Doan
241 Posted December 19, 2005 Posted December 19, 2005 1264 - Out of range value adjusted for column 'products_id' at row 1 insert into products_notifications (products_id, customers_id, date_added) values ('', '9', now()) [TEP STOP] Your errors are very similar again this is because there is no product_id in the insert which is the first column you have '' when you should have an id number. This would suggest that the id is not being passed in the code. Have you modified the files? Just trying to get some background information to the issue for a resolve No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes.
Guest Posted December 19, 2005 Posted December 19, 2005 Your errors are very similar again this is because there is no product_id in the insert which is the first column you have '' when you should have an id number. This would suggest that the id is not being passed in the code. Have you modified the files? Just trying to get some background information to the issue for a resolve Hi thank you for the respond. Yes i have modified some files, during installing contributions. May i ask you that would you happen to know or have any ideas of which file it causing the problem so i can undo it, since most of the files that i modify i have the backup of those files. Once again thank you for your help, and hope to hear from you soon. Have a nice evening. Best regards Kevin Doan
♥Vger Posted December 19, 2005 Posted December 19, 2005 It looks as though either your backup of the database did not run correctly when it was done, or else it did not run correctly when it was re-installed. The reason you appear to be getting this problem is because when the restore is done it inserts lots of data into the products_notifications table. This is a sample of how it should look: insert into products_notifications (products_id, customers_id, date_added) values ('35', '3', '2005-03-25 19:38:13'); You'll notice that where this code says '35' for products id yours is empty. Once again you should be able to resolve the problem by dropping the contents of the products_notifications table. This would mean that anyone who had previously signed up to be notified of updates to those products would not now be notified. My next move would be to edit the root level checkout_success.php to remove the code for Product Notifications appearing on that page. It is a complete waste of time to ask people to sign up to be notified of updates to products they have already bought. Vger
Guest Posted December 19, 2005 Posted December 19, 2005 It looks as though either your backup of the database did not run correctly when it was done, or else it did not run correctly when it was re-installed. The reason you appear to be getting this problem is because when the restore is done it inserts lots of data into the products_notifications table. This is a sample of how it should look: insert into products_notifications (products_id, customers_id, date_added) values ('35', '3', '2005-03-25 19:38:13'); You'll notice that where this code says '35' for products id yours is empty. Once again you should be able to resolve the problem by dropping the contents of the products_notifications table. This would mean that anyone who had previously signed up to be notified of updates to those products would not now be notified. My next move would be to edit the root level checkout_success.php to remove the code for Product Notifications appearing on that page. It is a complete waste of time to ask people to sign up to be notified of updates to products they have already bought. Vger Hi Vger, Thank you for your reply. I dropped all the contents in the product_notifications table, but however i still get that error message :(. Also i removed this line of code from checkout_success.php if ($global['global_product_notifications'] != '1') { echo TEXT_NOTIFY_PRODUCTS . '<br><p class="productsNotifications">'; $products_displayed = array(); for ($i=0, $n=sizeof($products_array); $i<$n; $i++) { if (!in_array($products_array[$i]['id'], $products_displayed)) { echo tep_draw_checkbox_field('notify[]', $products_array[$i]['id']) . ' ' . $products_array[$i]['text'] . '<br>'; $products_displayed[] = $products_array[$i]['id']; } } echo '</p>'; } else { echo TEXT_SEE_ORDERS . '<br><br>' . TEXT_CONTACT_STORE_OWNER; } It doesn't ask the buyer for signing up for any notifications anymore, so its good. But because it doesn't ask anymore, whenever i click CONTINUE, i keep getting the same error message. May i ask you that should i drop the whole products_notification table in database? Thank you in advance, Kevin Doan
Recommended Posts
Archived
This topic is now archived and is closed to further replies.