• Resolved stanxxx

    (@stanxxx)


    Wouldn’t it be better to use INT rather than VARCHAR for postnum? That would allow to sort by value.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Steve Truman

    (@a3rev)

    Hello @stanxxx

    Thanks for the question – the plugin uses VARCHAR instead of INT because VARCHAR supports all object, not just post and page. It we enables developers to get total views of any object.

    I will change the status of this issue to resolved.

    Thank you
    Steve

    Thread Starter stanxxx

    (@stanxxx)

    Understood! By the way I have a question, we track currently only posts, but would like to add a counter on the index page. Tried with a custom code, no way to make it work, probably we put it in a wrong place. We tried into a widget on the homepage, nothing. Where should it be placed?
    I will anyway come back to you for the described problem, and thank you very much for your reply by mail too!

    Plugin Author Steve Truman

    (@a3rev)

    Hello @stanxxx

    You can use the PVC PHP tags to add the counter.

    Example, to update counter of an object with key is ‘my-index-1’
    <?php pvc_stats_update( 'my-index-1', 0 ); ?>

    And use this PHP code to show counter of an object
    <?php pvc_stats( 'my-index-1', 1 ); ?>

    Hope that helps.

    Steve

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Why VARCHAR for postnum ?’ is closed to new replies.