Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

i am using WordPress multisite, the issue i face is that the posts queried from sql is more than those showed on the page, the details is as follows:

mysql> select count(*) from wp_137_posts where post_type='post';
+----------+
| count(*) |
+----------+
| 32 |
+----------+
1 row in set (0.46 sec)

here i find there is 32 posts to the blog whose id is 137

but in fact when i open that blog, i can find only 30 posts including both published and draft posts.

why there are not 32 posts when i open my blog?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Autosaves get stored with post_type=inherit and other objects such as menus are also stored in the posts table.

share|improve this answer
    
how to filter these posts using sql query –  hugemeow Sep 20 '12 at 3:03
    
seems i have find the sql query string to do the thing i want, that is select ID,guid from wp_num_posts where post_status='publish' and post_type='post. btw, is there any useful links from which i can know more details about wp's database designation? –  hugemeow Sep 20 '12 at 3:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.