Title: getting error while pageview updation
Last modified: September 20, 2017

---

# getting error while pageview updation

 *  [sajitkk](https://wordpress.org/support/users/sajitkk/)
 * (@sajitkk)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/getting-error-while-pageview-updation/)
 * gitting this error in browser console
 * <div id=”error”><p class=”wpdberror”>**WordPress database error:** [You have 
   an error in your SQL syntax; check the manual that corresponds to your MariaDB
   server version for the right syntax to use near '%4$d, last_viewed = '%3$s'' 
   at line 3]<br />`INSERT INTO wp_popularpostsdata
    (postid, day, last_viewed, 
   pageviews) VALUES (146, ‘2017-09-20 12:49:31’, ‘2017-09-20 12:49:31’, 1) ON DUPLICATE
   KEY UPDATE pageviews = pageviews + %4$d, last_viewed = ‘%3$s’;`</p></div><div
   id="error"><p class="wpdberror"><strong>WordPress database error:</strong> [You
   have an error in your SQL syntax; check the manual that corresponds to your MariaDB
   server version for the right syntax to use near '%2$d, last_viewed = '%4$s'' 
   at line 3]<br />`INSERT INTO wp_popularpostssummary (postid, pageviews, view_date,
   last_viewed) VALUES (146, 1, ‘2017-09-20’, ‘2017-09-20 12:49:31’) ON DUPLICATE
   KEY UPDATE pageviews = pageviews + %2$d, last_viewed = ‘%4$s’;`</p></div>WPP:
   Oops, could not update the views count!
    -  This topic was modified 8 years, 8 months ago by [sajitkk](https://wordpress.org/support/users/sajitkk/).

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

 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/getting-error-while-pageview-updation/#post-9513677)
 * This is not the place for support requests.
 *  Thread Starter [sajitkk](https://wordpress.org/support/users/sajitkk/)
 * (@sajitkk)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/getting-error-while-pageview-updation/#post-9514363)
 * its written on top of the page “SUPPORT”
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [8 years, 8 months ago](https://wordpress.org/support/topic/getting-error-while-pageview-updation/#post-9514462)
 * This is the review section, is what they mean.
 * [https://wordpress.org/support/plugin/wordpress-popular-posts/reviews](https://wordpress.org/support/plugin/wordpress-popular-posts/reviews)
 * vs
 * [https://wordpress.org/support/plugin/wordpress-popular-posts](https://wordpress.org/support/plugin/wordpress-popular-posts)
 * Which is semantics, I know. But you filed a review in lieu of support (that’s
   why there are stars). That doesn’t excuse the dismissive answer of course.
 * Alas I’m unfamiliar with the particular error, but I would start by making sure
   I’m on the latest version of Maria DB
 *  Thread Starter [sajitkk](https://wordpress.org/support/users/sajitkk/)
 * (@sajitkk)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/getting-error-while-pageview-updation/#post-9514819)
 * yes hahaha I am sorry for that
    and I find the solution and solved the issue 
   thanks
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/getting-error-while-pageview-updation/#post-9514893)
 * Didn’t mean to come out as dismissive. I’m not really a morning person, and actually
   found a couple of minutes later that he had posted in the support forums too.
 * All is well now, his report helped debug the issue so thanks 🙂
 *  [conorseed](https://wordpress.org/support/users/conorseed/)
 * (@conorseed)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/getting-error-while-pageview-updation/#post-9540706)
 * [@sajitkk](https://wordpress.org/support/users/sajitkk/) Just came across the
   same error. Would love to know what your solution was 🙂
 *  Thread Starter [sajitkk](https://wordpress.org/support/users/sajitkk/)
 * (@sajitkk)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/getting-error-while-pageview-updation/#post-9541221)
 * I replaced token in the above SQL query with the respective variable and it worked
   But you can also update the plugin, they have solved the issue, it will be the
   standard solution

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

The topic ‘getting error while pageview updation’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-popular-posts/assets/icon-256x256.png?rev=1232659)
 * [WP Popular Posts](https://wordpress.org/plugins/wordpress-popular-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-popular-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-popular-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-popular-posts/reviews/)

 * 7 replies
 * 4 participants
 * Last reply from: [sajitkk](https://wordpress.org/support/users/sajitkk/)
 * Last activity: [8 years, 8 months ago](https://wordpress.org/support/topic/getting-error-while-pageview-updation/#post-9541221)