Again, I’m not sure I know what I’m doing, but when I click the little "U" button next to page_id, I get the following error:
SQL query:
ALTER TABLE `modx_page_hit_counter` ADD UNIQUE (
`page_id`
)
MySQL said: Documentation
#1062 - Duplicate entry ’3’ for key 1
Doesn’t this mean it is set as unique? If I’m way off or not making sense here, I apologize.
-
- 2,310 Posts
MySQL probably won’t let you set the field to a Unique Key if there are duplicate entries.
Maybe use the EMPTY TABLE command then set to UNIQUE KEY and start afresh with recording page hits?
SUCCESS!!! Bunk, you’re a lifesaver. Emptying the table and setting it to Unique fixed it. I knew I was close to getting it right, but something just wasn’t clicking, and I know just enough MySQL to get myself in trouble. I can’t thank you enough.