ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Reset track_views for a particular post?

January 27, 2011 10:06am

Subscribe [2]
  • #1 / Jan 27, 2011 10:06am

    demotive

    8 posts

    Hi all…

    I’ve come into a bit of a problem with track_views, as per: http://expressionengine.com/legacy_docs/modules/weblog/entry_tracking.html

    I’ve had a request from my client that he wants to reset the counter for a particular post, to stop it constantly appearing at the top of his “popular articles” listing - it was a bit controversial, and I think he wants it to die a clean death 😉

    I’m pretty sure something this granular can’t be done from the Control Panel, but if this is the case, can anyone point me to where this data would be held in the DB?

    My assumption is I can go into the DB (phpMyAdmin over here), and for that particular record, change the value in the field…

    I hope this is clear enough for everyone, and that someone can give me some pointers…?
    Thanks all.

  • #2 / Jan 27, 2011 7:40pm

    Barry Cogan

    291 posts

    Hi Demotive,

    Before doing anything directly with the database please make sure you have a backup of it. Now that we have that important point out of the way, i can tell you that the fields you can erase on that particular entry are:

    “view_count_one”,

    “view_count_two”,

    “view_count_three”, and

    “view_count_four”.

    These fields are located in the “weblog_titles” table. 

    You may have an “exp_” before the name of the table if you didn’t change the prefix during the installation.

    You can find the specific entry by “entry_id”, “title”, or “url_title”.

    Once you have found your row you can just click on the pencil icon in PHPMyAdmin to edit those 4 fields to 0 (zero) and that should do the trick for you.

    But remember before doing any of this it is highly recommended you backup the database before directly changing anything.  As there are no undos!

    Sincerely,
    Barry

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases