-
1062 Duplicate entry '0' for key 1 after export/import of database
Can someone please help I am having some major problems I changed servers a few days ago at first I got this error in the admin section I found a fix on the forum and it worked.
A couple of days ago this error started to happen on the front page all content disappears and just underneath the side boxes on the left and the side boxes on the right completely disappear.
If I upload the old database from the backup I made before I moved servers it is fine at first but then the day after this problem is back again.
I really need some help on this I have to get this sit backup and running I would appreciate any help that can be given.
-
Re: 1062 Duplicate entry '0' for key 1
I have managed to resolve this now from what I can gather the problem was coming from anything to do with history stored in the MySql database.
If anyone else gets this problem drop everything from the following tables:
- admin_activity_log
- banners_history
- counter_history
- sessions
This should sort your problem out.
-
Re: 1062 Duplicate entry '0' for key 1
Hello i to have this problem i am using secpay for payment the first order i ever tested on the site worked then the second one didnt giving me a '1062 Duplicate entry '0' for key 1' on a blank page, so i deleted my first order in admin and the next order worked but the same fault again with the second test, it looks like the orders are not counting up please can some one point me in the right direction thank you.:smile:
-
Re: 1062 Duplicate entry '0' for key 1
this problem has come back again please help.
-
Re: 1062 Duplicate entry '0' for key 1
-
Re: 1062 Duplicate entry '0' for key 1
I am having a similar problem. I can tell you that I have moved my entire site recently from a Shared Hosting server to another shared server. The only difference between the two MySQL setup's is version numbers. I exported from the old to the new and everything took until I ran the program. I get this :
http://savannahspasecrets.com (see all the way bottom left column).
If I remove the most recent row written the app does fine until the next row... which of course is already there. It's like the app has reset the count or lost what the last ID it was on?
The app, whether logged in as admin or visitor, writes starting from '0' to each table??
-
Re: 1062 Duplicate entry '0' for key 1
Please someone must no what is causing this and how to fix it any help will be much appreciated
-
Re: 1062 Duplicate entry '0' for key 1
There are approx 100 tables in a Zen Cart database. Thus, the cause of that error could be related to any one of them.
I tried to help earlier by asking:
Quote:
Originally Posted by DrByte
What's your URL?
... but you never replied.
-
Re: 1062 Duplicate entry '0' for key 1
Quote:
Originally Posted by adanker
I don't see any errors on that page.
-
Re: 1062 Duplicate entry '0' for key 1
Code:
1062 Duplicate entry '0' for key 1
in:
[insert into admin_activity_log (access_date, admin_id, page_accessed, page_parameters, ip_address) values (now(), '1', 'attributes_controller.php', '', '**.**.0.64')]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
Thats the error i get.
I assume this is because the Now() function is returning 0 and not the correct date & time...
Any suggestions on how to fix it?
Btw, this happens only when using the admin interface...
i'll try using the fix_cache_key, maybe that is the problem...
have to wait to ftp it up though.
Just tried fix_cache_key... doesn't help solve problem.
-
Re: 1062 Duplicate entry '0' for key 1
SOLUTION:
Exectute the following SQL code in PHPMyAdmin... (Copy & paste)
This will change the log_id column to auto_increment... you get this error when it doesn't auto_increment!
Code:
ALTER TABLE admin_activity_log CHANGE COLUMN log_id log_id int(15) NOT NULL auto_increment;
Found in thread http://www.zen-cart.com/forum/showpo...5&postcount=13
Worked for me!
Hope it helps everyone else out there...
-
Re: 1062 Duplicate entry '0' for key 1
As you can probably tell my issue with savannahspasecrets.com has been resolved. For the duplicate entry error message that I received I simply compared the original sql file that built the original tables for the database to the errored database. I found that for every "key" ID I was missing the auto-increment setting. In this case upon every new data entry to what ever table it was trying to start from "0" and then the following new row written would try to write over this same row key value with "0"... kicking back to the script a <b>1062 Duplicate entry '0' for key 1</b> error! Bingo, this solution has been working for my zen-cart for 2 weeks now.
Good luck, I will try to help anyone else if their situation is a bit different.
Aaron
-
Re: 1062 Duplicate entry '0' for key 1
Quote:
Originally Posted by adanker
As you can probably tell my issue with savannahspasecrets.com has been resolved. For the duplicate entry error message that I received I simply compared the original sql file that built the original tables for the database to the errored database. I found that for every "key" ID I was missing the auto-increment setting. In this case upon every new data entry to what ever table it was trying to start from "0" and then the following new row written would try to write over this same row key value with "0"... kicking back to the script a <b>1062 Duplicate entry '0' for key 1</b> error! Bingo, this solution has been working for my zen-cart for 2 weeks now.
Good luck, I will try to help anyone else if their situation is a bit different.
Aaron
would be cool if someone posted an SQL patch to fix alll auto_increment collumns that are not auto_increment now...
or is there a better way to do it, without screwing up your migrated data?
I fixed the one in the admin activity log, but i have to fix it in the other tables too... the banner history log i guess... (when the error shows up on the bottom of the page on the main site)
Code:
ALTER TABLE admin_activity_log CHANGE COLUMN log_id log_id int(15) NOT NULL auto_increment;
ALTER TABLE banners_history CHANGE COLUMN banners_history_id banners_history_id int(11) NOT NULL auto_increment;
probably need to edit other tables with history in it...
e.g. orders_status_history, paypal_payment_status_history, project_version_history
-
Re: 1062 Duplicate entry '0' for key 1
If the tables which are "supposed to have" auto-increment on them ... do not... then you've done something odd with your database. When Zen Cart installs them, they are already set to auto-increment.
My point is that there's not so much a need for a script to set them to auto-increment, but rather the more important key is to find out WHY they have lost the auto-increment setting in the first place....
-
Re: 1062 Duplicate entry '0' for key 1
I've just moved my site by doing a database export & import and ran into the same problem. i think I may have resolved it by reinstating the autoincrement in the Extra column of log_id in the admin_activity_log table.
-
Re: 1062 Duplicate entry '0' for key 1
I suppose one potential cause of losing auto-increment settings is if you do a backup via phpMyAdmin and uncheck the box related to retaining auto-increment values.
Technically this shouldn't leave the auto-increment out of the structure/schema, just not include the current value in it.
Perhaps something's busted there...
-
Re: 1062 Duplicate entry '0' for key 1
Okay, having found more cases of problems identical to this, it appears that the cause is related to the way in which various hosts will export backups of data to transfer from one server to another. I'm guessing that many of them don't include the auto-increment property by default ... which is very unfortunate. I'm rather surprised to have not seen this reported earlier. Nevertheless, here's a script to reinstate auto-increment properties on tables in v1.3.x:
Code:
# This script simply rebuilds the auto-increment settings on tables which should have them.
ALTER TABLE upgrade_exceptions CHANGE COLUMN upgrade_exception_id upgrade_exception_id smallint(5) NOT NULL auto_increment;
ALTER TABLE address_book CHANGE COLUMN address_book_id address_book_id int(11) NOT NULL auto_increment;
ALTER TABLE address_format CHANGE COLUMN address_format_id address_format_id int(11) NOT NULL auto_increment;
ALTER TABLE admin CHANGE COLUMN admin_id admin_id int(11) NOT NULL auto_increment;
ALTER TABLE admin_activity_log CHANGE COLUMN log_id log_id int(15) NOT NULL auto_increment;
ALTER TABLE authorizenet CHANGE COLUMN id id int(11) unsigned NOT NULL auto_increment;
ALTER TABLE banners CHANGE COLUMN banners_id banners_id int(11) NOT NULL auto_increment;
ALTER TABLE banners_history CHANGE COLUMN banners_history_id banners_history_id int(11) NOT NULL auto_increment;
ALTER TABLE categories CHANGE COLUMN categories_id categories_id int(11) NOT NULL auto_increment;
ALTER TABLE configuration CHANGE COLUMN configuration_id configuration_id int(11) NOT NULL auto_increment;
ALTER TABLE configuration_group CHANGE COLUMN configuration_group_id configuration_group_id int(11) NOT NULL auto_increment;
ALTER TABLE countries CHANGE COLUMN countries_id countries_id int(11) NOT NULL auto_increment;
ALTER TABLE coupon_email_track CHANGE COLUMN unique_id unique_id int(11) NOT NULL auto_increment;
ALTER TABLE coupon_gv_queue CHANGE COLUMN unique_id unique_id int(5) NOT NULL auto_increment;
ALTER TABLE coupon_redeem_track CHANGE COLUMN unique_id unique_id int(11) NOT NULL auto_increment;
ALTER TABLE coupon_restrict CHANGE COLUMN restrict_id restrict_id int(11) NOT NULL auto_increment;
ALTER TABLE coupons CHANGE COLUMN coupon_id coupon_id int(11) NOT NULL auto_increment;
ALTER TABLE currencies CHANGE COLUMN currencies_id currencies_id int(11) NOT NULL auto_increment;
ALTER TABLE customers CHANGE COLUMN customers_id customers_id int(11) NOT NULL auto_increment;
ALTER TABLE customers_basket CHANGE COLUMN customers_basket_id customers_basket_id int(11) NOT NULL auto_increment;
ALTER TABLE customers_basket_attributes CHANGE COLUMN customers_basket_attributes_id customers_basket_attributes_id int(11) NOT NULL auto_increment;
ALTER TABLE email_archive CHANGE COLUMN archive_id archive_id int(11) NOT NULL auto_increment;
ALTER TABLE featured CHANGE COLUMN featured_id featured_id int(11) NOT NULL auto_increment;
ALTER TABLE files_uploaded CHANGE COLUMN files_uploaded_id files_uploaded_id int(11) NOT NULL auto_increment;
ALTER TABLE geo_zones CHANGE COLUMN geo_zone_id geo_zone_id int(11) NOT NULL auto_increment;
ALTER TABLE group_pricing CHANGE COLUMN group_id group_id int(11) NOT NULL auto_increment;
ALTER TABLE ezpages CHANGE COLUMN pages_id pages_id int(11) NOT NULL auto_increment;
ALTER TABLE languages CHANGE COLUMN languages_id languages_id int(11) NOT NULL auto_increment;
ALTER TABLE layout_boxes CHANGE COLUMN layout_id layout_id int(11) NOT NULL auto_increment;
ALTER TABLE manufacturers CHANGE COLUMN manufacturers_id manufacturers_id int(11) NOT NULL auto_increment;
ALTER TABLE media_clips CHANGE COLUMN clip_id clip_id int(11) NOT NULL auto_increment;
ALTER TABLE media_manager CHANGE COLUMN media_id media_id int(11) NOT NULL auto_increment;
ALTER TABLE media_types CHANGE COLUMN type_id type_id int(11) NOT NULL auto_increment;
ALTER TABLE meta_tags_categories_description CHANGE COLUMN categories_id categories_id int(11) NOT NULL auto_increment;
ALTER TABLE meta_tags_products_description CHANGE COLUMN products_id products_id int(11) NOT NULL auto_increment;
ALTER TABLE music_genre CHANGE COLUMN music_genre_id music_genre_id int(11) NOT NULL auto_increment;
ALTER TABLE newsletters CHANGE COLUMN newsletters_id newsletters_id int(11) NOT NULL auto_increment;
ALTER TABLE orders CHANGE COLUMN orders_id orders_id int(11) NOT NULL auto_increment;
ALTER TABLE orders_products CHANGE COLUMN orders_products_id orders_products_id int(11) NOT NULL auto_increment;
ALTER TABLE orders_products_attributes CHANGE COLUMN orders_products_attributes_id orders_products_attributes_id int(11) NOT NULL auto_increment;
ALTER TABLE orders_products_download CHANGE COLUMN orders_products_download_id orders_products_download_id int(11) NOT NULL auto_increment;
ALTER TABLE orders_status_history CHANGE COLUMN orders_status_history_id orders_status_history_id int(11) NOT NULL auto_increment;
ALTER TABLE orders_total CHANGE COLUMN orders_total_id orders_total_id int(10) unsigned NOT NULL auto_increment;
ALTER TABLE paypal_session CHANGE COLUMN unique_id unique_id int(11) NOT NULL auto_increment;
ALTER TABLE paypal CHANGE COLUMN paypal_ipn_id paypal_ipn_id int(11) unsigned NOT NULL auto_increment;
ALTER TABLE paypal_testing CHANGE COLUMN paypal_ipn_id paypal_ipn_id int(11) unsigned NOT NULL auto_increment;
ALTER TABLE paypal_payment_status CHANGE COLUMN payment_status_id payment_status_id int(11) NOT NULL auto_increment;
ALTER TABLE paypal_payment_status_history CHANGE COLUMN payment_status_history_id payment_status_history_id int(11) NOT NULL auto_increment;
ALTER TABLE product_type_layout CHANGE COLUMN configuration_id configuration_id int(11) NOT NULL auto_increment;
ALTER TABLE product_types CHANGE COLUMN type_id type_id int(11) NOT NULL auto_increment;
ALTER TABLE products CHANGE COLUMN products_id products_id int(11) NOT NULL auto_increment;
ALTER TABLE products_attributes CHANGE COLUMN products_attributes_id products_attributes_id int(11) NOT NULL auto_increment;
ALTER TABLE products_description CHANGE COLUMN products_id products_id int(11) NOT NULL auto_increment;
ALTER TABLE products_options_values_to_products_options CHANGE COLUMN products_options_values_to_products_options_id products_options_values_to_products_options_id int(11) NOT NULL auto_increment;
ALTER TABLE project_version CHANGE COLUMN project_version_id project_version_id tinyint(3) NOT NULL auto_increment;
ALTER TABLE project_version_history CHANGE COLUMN project_version_id project_version_id tinyint(3) NOT NULL auto_increment;
ALTER TABLE query_builder CHANGE COLUMN query_id query_id int(11) NOT NULL auto_increment;
ALTER TABLE record_artists CHANGE COLUMN artists_id artists_id int(11) NOT NULL auto_increment;
ALTER TABLE record_company CHANGE COLUMN record_company_id record_company_id int(11) NOT NULL auto_increment;
ALTER TABLE reviews CHANGE COLUMN reviews_id reviews_id int(11) NOT NULL auto_increment;
ALTER TABLE salemaker_sales CHANGE COLUMN sale_id sale_id int(11) NOT NULL auto_increment;
ALTER TABLE specials CHANGE COLUMN specials_id specials_id int(11) NOT NULL auto_increment;
ALTER TABLE tax_class CHANGE COLUMN tax_class_id tax_class_id int(11) NOT NULL auto_increment;
ALTER TABLE tax_rates CHANGE COLUMN tax_rates_id tax_rates_id int(11) NOT NULL auto_increment;
ALTER TABLE template_select CHANGE COLUMN template_id template_id int(11) NOT NULL auto_increment;
ALTER TABLE zones CHANGE COLUMN zone_id zone_id int(11) NOT NULL auto_increment;
ALTER TABLE zones_to_geo_zones CHANGE COLUMN association_id association_id int(11) NOT NULL auto_increment;
NOTE: The up-to-date version of this script is ALSO available in the Zen Cart master fileset ... look for: /zc_install/sql/db_rebuild_autoincrement.sql
-
Re: 1062 Duplicate entry '0' for key 1
Thanks a lot for this Dr. Byte. I think you are correct in that the export import doesn't work out correctly.
Can a moderator merge all the topics that have the same symptom? as that will surely get people to the answer faster...
Maybe this should be added to the FAQ?
-
Re: 1062 Duplicate entry '0' for key 1
I am experiencing this problem in my admin area when I try to go anywhere.
What can be done to correct this?
cshart
-
Re: 1062 Duplicate entry '0' for key 1
When exporting from mysql4.1 and using the --compat=mysql40 or --compaty-mysql3 flags, mysqldump export command will not give you proper auto-increment flags. This is considered proper behavior by MySQL AB and will not be changed. When going from 4.1 to 4.0 or 3.23 the most common issue is the syntax at the end of the table definition: ENGINE= and DEFAULT_CHARSET=.
Here is a general fix for dumping from 4.1 -> 4.0 or 3.23 when not using the --compat flag. This only fixes the most general problem with the table definitions, I don't think it works on enums, and it is only safe to use on a file that has only table definitions, not table definitions and data.
sed -e 's/\ ENGINE=\([a-zA-Z]*\)\ DEFAULT\ CHARSET=[a-zA-Z0-9]*/\ TYPE=\1/' foobar.mysql > foobar.fixed.mysql
or, for a directory of files
for x in `ls mydumpdir/*.sql`
do
sed -e 's/\ ENGINE=\([a-zA-Z]*\)\ DEFAULT\ CHARSET=[a-zA-Z0-9]*/\ TYPE=\1/' $x > fixed.$x
done
-
Re: 1062 Duplicate entry '0' for key 1
Quote:
Originally Posted by cshart
I am experiencing this problem in my admin area when I try to go anywhere.
What can be done to correct this?
cshart
1. Run the SQL statements above, via phpMyAdmin
2. Use phpMyAdmin to do a Database Backup, and then click on the admin_activity_log table and click the "Empty" button.
-
Re: 1062 Duplicate entry '0' for key 1
Dr. Byte, thank you so much for this script. I have spent the last week moving sites and this overwhelmed me. I found your script, ran it and voila. Thank you.
Darlene
-
Re: 1062 Duplicate entry '0' for key 1
:clap: Dr. Byte.... You are the Greatest:clap:. your script fixed my issue. Thanks
-
Re: 1062 Duplicate entry '0' for key 1
Quote:
Originally Posted by
DrByte
1. Run the SQL statements above, via phpMyAdmin
2. Use phpMyAdmin to do a
Database Backup, and then click on the admin_activity_log table and click the "Empty" button.
Thank you so much DrByte! I just had to do this and it worked PERFECTLY! :clap::clap::clap: You're a sanity saver!
Leah
-
Re: 1062 Duplicate entry '0' for key 1
Quote:
Originally Posted by
jdimaging
Dr. Byte, thank you so much for this script. I have spent the last week moving sites and this overwhelmed me. I found your script, ran it and voila. Thank you.
Darlene
Ditto !
:clap:
-
Re: 1062 Duplicate entry '0' for key 1 after export/import of database
Drbyte!
Please can you create a SQL command for phpmyadmin for zencart version 1.2.1?
Please, I would really appreciate it.
-
Re: 1062 Duplicate entry '0' for key 1 after export/import of database
Hi All
I could really use some help with my issue:
1062 Duplicate entry '0' for key 1
in:
[insert into banners_history (banners_id, banners_shown, banners_history_date) values ('52', 1, now())]
Link to my site:
http://www.digitalsaonline.co.za/catalog/
I have done everything on this forum as suggested and still having the same issue
I have cleared history on all tables that i could find listed here, have run the SQL script and have gone and DEL all my banners in PHPmyAdmin
What else do i need to do to fix this
Issue is coming up in both site and admin
Admin error is:
1062 Duplicate entry '0' for key 1
in:
[insert into admin_activity_log (access_date, admin_id, page_accessed, page_parameters, ip_address) values (now(), '1', 'store_manager.php', '', '198.54.202.30')]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
All help appreciated
Thanks
-
Re: 1062 Duplicate entry '0' for key 1 after export/import of database
Hi All
Any update please or help on my post?
-
Re: 1062 Duplicate entry '0' for key 1 after export/import of database
When did this start happening?
How does that relate to things done to your webserver or your site or your database or your hosting account?
What version of Zen Cart? Is this an upgrade? from which version(s)? When?
What addons do you have installed?
Side-note: the proper etiquette for "bumping" your post is to post more information about the problem, not just say "help". Related info: http://www.zen-cart.com/forum/faq.ph...aq_do_and_dont
-
Re: 1062 Duplicate entry '0' for key 1 after export/import of database
Quote:
Originally Posted by
DrByte
When did this start happening?
How does that relate to things done to your webserver or your site or your database or your hosting account?
What version of Zen Cart? Is this an upgrade? from which version(s)? When?
What addons do you have installed?
Side-note: the proper etiquette for "bumping" your post is to post more information about the problem, not just say "help". Related info:
http://www.zen-cart.com/forum/faq.ph...aq_do_and_dont
Thank you so much for the reply
My site generates income for my family and really need to get it working for my clients to purchase from me from tomorrow
It started yesterday
Not sure i understand your second ?
Not an upgrade, its a install from zencart zip files, version "New Version Available v1.3.8" so i think its version 1.3.7
Started my site a year ago and moved to new hosting company about 5 months ago, all has been working fine
Add ons:
I think the cart editor addon, allows me to edit client orders, thats about it
Thanks again for the reply
-
Re: 1062 Duplicate entry '0' for key 1 after export/import of database
Sorry about that here is some more info:
You should include:
a- The version of Zen Cart you are using and whether this is a new install or an upgrade.
I think im on version 1.3.7, new install
b- A list of all the addons/contributions you have installed, and any kinds of customizations you've made to your site.
Cart Editor nothing else
c- The type of server you are using and, if you are installing locally, the operating system
This i dont know, i do know my site is hosted in Florida on Linux server
d- The version of PHP installed on the server
phpMyAdmin - 2.8.2.4
e- The version of MYSQL installed on the server
MySQL - 4.1.20
f- Details of exactly what you were doing when your problem occurred.
I logged into the site and found the error
-
Re: 1062 Duplicate entry '0' for key 1 after export/import of database
Here is a link to a screenshot of the admin_activity_log
http://img262.imageshack.us/img262/1...vityloggj1.jpg
Does any thing look odd?
-
Re: 1062 Duplicate entry '0' for key 1 after export/import of database
[FONT=Arial]Hi All again[/FONT]
[FONT=Arial]I have PMed DrByte for some help but will post my PM here as well, maybe some one can see something i dont as im new to MySQL and have no idea what im looking for:[/FONT]
[FONT=Arial] [/FONT]
[FONT=Arial]Please see below for things I have found that look a bit odd while checking each tables “Auto_Increment” is on and that the Next Autoindex number is correct when checking against the primary field under the browse option for that table :[/FONT]
[FONT=Arial]· [/FONT][FONT=Arial]email_archive table - not found in mysql[/FONT]
[FONT=Arial]· [/FONT][FONT=Arial]featured table shows value 11 for Next Autoindex but the browse option is greyed out[/FONT]
[FONT=Arial]· [/FONT][FONT=Arial]products_attributes table shows value 1,104 for Next Autoindex but browse button greyed out[/FONT]
[FONT=Arial]· [/FONT][FONT=Arial]specials table shows value 51 for the Next Autoindex but browse button greyed out[/FONT]
[FONT=Arial]· [/FONT][FONT=Arial]banners table shows value 56 for the Next Autoindex but browse button greyed out[/FONT]
[FONT=Arial]· [/FONT][FONT=Arial]configuration table shows the following warning UNIQUE and INDEX keys should not both be set for column `configuration_key`[/FONT]
[FONT=Arial]PS – I have also checked the updated SQL script in the Zen Cart 1.3.8 zip files[/FONT]
[FONT=Arial]Some other details:[/FONT]
[FONT=Arial]Site: http://www.digitalsaonline.co.za/catalog/[/FONT]
[FONT=Arial]MySQL - 4.1.20[/FONT]
[FONT=Arial]phpMyAdmin - 2.8.2.4[/FONT]
[FONT=Arial]Error occurred on the: 28th June 2008[/FONT]
[FONT=Arial]System Changes: none what so every prior to error, apart from new banners:[/FONT]
[FONT=Arial]Other errors:[/FONT]
[FONT=Arial]Site:[/FONT]
[FONT=Arial]1062 Duplicate entry '0' for key 1
in:
[insert into banners_history (banners_id, banners_shown, banners_history_date) values ('55', 1, now())][/FONT]
[FONT=Arial]Admin:[/FONT]
[FONT=Arial]1062 Duplicate entry '0' for key 1
in:
[insert into admin_activity_log (access_date, admin_id, page_accessed, page_parameters, ip_address) values (now(), '1', 'store_manager.php', '', '198.54.202.30')]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.[/FONT]
-
Re: 1062 Duplicate entry '0' for key 1 after export/import of database
Quote:
Originally Posted by
LloydR
Yes ... why is the table empty (0 rows) and created today?
-
Re: 1062 Duplicate entry '0' for key 1 after export/import of database
Quote:
Originally Posted by
LloydR
Please see below for things I have found that look a bit odd while checking each tables “Auto_Increment” is on and that the Next Autoindex number is correct when checking against the primary field under the browse option for that table :
· featured table shows value 11 for Next Autoindex but the browse option is greyed out
· products_attributes table shows value 1,104 for Next Autoindex but browse button greyed out
· specials table shows value 51 for the Next Autoindex but browse button greyed out
· banners table shows value 56 for the Next Autoindex but browse button greyed out
If the browse button is greyed out, that means there's no data in the table to be browsed
Quote:
Originally Posted by
LloydR
· email_archive table - not found in mysql
If you're not archiving any emails then that won't matter. But it begs the question of "how" did it disappear? If it's missing during a database-upgrade, you may run into errors that will cause upgrade challenges since it will have to abort mid-stream. Thus I suggest that you recreate it perhaps from a backup.
Quote:
Originally Posted by
LloydR
· configuration table shows the following warning UNIQUE and INDEX keys should not both be set for column `configuration_key`
That's normal, and can be ignored.
Quote:
Originally Posted by
LloydR
1062 Duplicate entry '0' for key 1
in:
[insert into banners_history (banners_id, banners_shown, banners_history_date) values ('55', 1, now())]
"key 1" is probably the primary key on the table, which would be the banners_history_id field.
Since the "insert" statement doesn't mention that field (and this is normal and desired), it is expecting the auto-increment attribute of that field to automatically select the correct next number. So, if you're getting that error on that table, it means the banners_history_id is not set to autoincrement.
Quote:
Originally Posted by
LloydR
Admin:
1062 Duplicate entry '0' for key 1
in:
[insert into admin_activity_log (access_date, admin_id, page_accessed, page_parameters, ip_address) values (now(), '1', 'store_manager.php', '', '198.54.202.30')]
Same issue as mentioned above for banners_history table.
If it was working flawlessly until a certain date, then unless it's something you or your staff have done to the site, your first line of support for these odd database issues should be your hosting company -- so they can investigate what may be wrong on the server to break the autoincrement funcitonality.
-
Re: 1062 Duplicate entry '0' for key 1 after export/import of database
Quote:
Originally Posted by
DrByte
Yes ... why is the table empty (0 rows) and created today?
I clicked on empty, could that be the issue?
Thanks for the reply
-
Re: 1062 Duplicate entry '0' for key 1 after export/import of database
Great my hosting company changed servers with our telling me, how nice of them
So i worked in the wrong DB the whole week end
Thanks for the help DrByte
-
Re: 1062 Duplicate entry '0' for key 1 after export/import of database
The problem for me was that there were still entries for old customers sitting in the "customer_info" table. I dropped that and started my 'customers_id' field in the "customers" table at 1 again and it works great. Hope this helps someone.