Title: BUGG
Last modified: August 30, 2016

---

# BUGG

 *  [jessy](https://wordpress.org/support/users/jessy-marco/)
 * (@jessy-marco)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/bugg-5/)
 * Plugin still works, but there is bug, replace the function with this.
 *     ```
       function update_views($post_id) {
           global $wpdb;
           $p2_table = $wpdb->prefix.unique_p2_table();
           $views = get_total_views($post_id) + 1;
   
       	if (get_total_views($post_id) == 0)
               insert_views($views, $post_id);
       	   $result = $wpdb->query("UPDATE $p2_table SET view = $views WHERE post_id = '$post_id' AND ip_addres = '".$_SERVER['REMOTE_ADDR']."'");
          return ($result);
       }
       ```
   
 * [https://wordpress.org/plugins/unique-post-view-conter/](https://wordpress.org/plugins/unique-post-view-conter/)

The topic ‘BUGG’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/unique-post-view-conter_a6e1f8.svg)
 * [Unique Post Views Counter](https://wordpress.org/plugins/unique-post-view-conter/)
 * [Support Threads](https://wordpress.org/support/plugin/unique-post-view-conter/)
 * [Active Topics](https://wordpress.org/support/plugin/unique-post-view-conter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/unique-post-view-conter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/unique-post-view-conter/reviews/)

## Tags

 * [views count](https://wordpress.org/support/topic-tag/views-count/)

 * 0 replies
 * 1 participant
 * Last reply from: [jessy](https://wordpress.org/support/users/jessy-marco/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/bugg-5/)
 * Status: not resolved