Perhaps have a look at the PageStatistics table in your database (using something like phpMyAdmin) and see if you can either empty that table (if you don't care about the data), or delete the record it is complaining about.

I have the exact same problem with mysql 1062 error, but when I followed your directions, it returned another error message...

Fatal error: Call to undefined method ADODB_mysql::Excecute() in /home3/tclauset/public_html/c5/tools/fixdb.php on line 3

I have not gone into the msql database to try to delete the offending table yet and was wondering if either I messed up the fixdb.php file or if perhaps something is missing that caused the fatal error message.

Here is the modified fixdb.php file that I created from your instructions:

<?php$db= Loader::db();$db->Excecute('DELETE FROM PageStatistics WHERE pstID = 32059');echo'Deleted record, now delete this file';?>

Can you suggest a next step for me? Many thanks for your help. It's disconcerting to have your Concrete5 site suddenly dead in the water after days of tweaking its content.

Fixed the problem by going into myphpadmin and working on the PageStatistics table. When I looked at the table, I did NOT find a duplicate entry, so I "Checked" the table and the message that it returned said the table was corrupted. I then Repaired" the table and received an OK fixed message. The web site loaded fine after this repair work.

Since I've decided to use Google Analytics on the site, I turned OFF the site statistics option for Concrete 5.

1. Log in to phpMyAdmin
2. Select the PageStatistics table on the left
3. Go to the "Operations" page
4. At the bottom under "Table Maintenance", choose "Check Table".
5. Go back to the same area and "Repair Table".