Showing entries 1 to 2
Displaying posts with tag: comment (reset)
How To Diagnose And Fix Incorrect Post Comment Counts In WordPress

Introduction

If your WordPress comment counts got messed up, whether because of a plugin (I'm talking about you, DISQUS) or you messed with your database manually and did something wrong (yup, that's what I just did), fear not – I have a solution for you.

But first, a little background.

Comment Counts In WordPress

Here's how comment counts work in WP:

  • Posts live in a table called wp_posts and each has an ID.
  • Comments reside in a table called wp_comments, each referring to an ID in wp_posts.
  • However, to make queries faster, the comment count is also cached in the wp_posts table, rather than getting calculated on every page load.
    If this count ever gets out of sync with the actual number of comments for some reason, WordPress, while still displaying all comments properly, will simply show the wrong count. …
[Read more]
The Little Things

It’s always the little things in life. One of the things that has been a very “little thing” that causes a lot of frustration while writing The MySQL Administrator’s Bible is the prompt. Specifically, the fact that you can only change the first line of the prompt, but not the subsequent lines.


The default prompt that appears on the first line of the prompt is:
mysql>
The default (and unchangeable) second line of the prompt is four spaces followed by an ASCII arrow:

    ->

The second line of the prompt is hard-coded to match up very nicely with the first line in a fixed-width font:

mysql> SELECT
    -> 1+2;

However, you can change the prompt, which is pretty handy:

mysql> prompt \d:
PROMPT set to '\d: '
(none): use test;
Database …
[Read more]
Showing entries 1 to 2