Title: hack4lk's Replies | WordPress.org

---

# hack4lk

  [  ](https://wordpress.org/support/users/hack4lk/)

 *   [Profile](https://wordpress.org/support/users/hack4lk/)
 *   [Topics Started](https://wordpress.org/support/users/hack4lk/topics/)
 *   [Replies Created](https://wordpress.org/support/users/hack4lk/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/hack4lk/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/hack4lk/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/hack4lk/engagements/)
 *   [Favorites](https://wordpress.org/support/users/hack4lk/favorites/)

 Search replies:

## Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WebberZone Top 10 — Popular Posts] totalcount not updating](https://wordpress.org/support/topic/totalcount-not-updating/)
 *  Thread Starter [hack4lk](https://wordpress.org/support/users/hack4lk/)
 * (@hack4lk)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/totalcount-not-updating/#post-15409081)
 * Ok, we’ll take a look. We definitely can’t lose years of data but we’ll look 
   to recreating the tables. Thank you.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WebberZone Top 10 — Popular Posts] totalcount not updating](https://wordpress.org/support/topic/totalcount-not-updating/)
 *  Thread Starter [hack4lk](https://wordpress.org/support/users/hack4lk/)
 * (@hack4lk)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/totalcount-not-updating/#post-15409017)
 * The site is internal so I can’t share the url but every time there is a visit,
   there is another entry added in the top_ten table with the same post id and a
   value of 1 for the count. For now as a workaround we added SUM() to the column
   name query in the plugin code so it sums up the entries but that’s a workaround
   we’d like to not use. I understand after looking at the code that on duplicate
   key it’s suppose to increment the count but it looks like it’s not seeing a duplicate
   key and just adding a new entry into the table.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WebberZone Top 10 — Popular Posts] totalcount not updating](https://wordpress.org/support/topic/totalcount-not-updating/)
 *  Thread Starter [hack4lk](https://wordpress.org/support/users/hack4lk/)
 * (@hack4lk)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/totalcount-not-updating/#post-15408881)
 * I just took a look and it seems that now for every page visit there is one new
   entry in the **wp_top_ten **table as opposed to be before there was 1 entry per
   post where the visits was the total count.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Order by meta_key where meta_value is NUMBER](https://wordpress.org/support/topic/order-by-meta_key-where-meta_value-is-number/)
 *  [hack4lk](https://wordpress.org/support/users/hack4lk/)
 * (@hack4lk)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/order-by-meta_key-where-meta_value-is-number/#post-1098411)
 * gabrieljones, thanks for the hack….it worked perfectly and saved me tons of time!

Viewing 4 replies - 1 through 4 (of 4 total)