开发者

how to get the tag list in wordpress mysql

开发者 https://www.devze.com 2023-02-06 16:28 出处:网络
i want to get the following information from wordpress database relate to Tag TagID TagName TagPostCount

i want to get the following information from wordpress database relate to Tag

TagID TagName TagPostCount

Are anyone tell me and write a mysql command that give me list of this three detailed.

please don't show me PHP code. i am not really want to know about them and off-course i am开发者_StackOverflow relate to PHP.

how i can write a Mysql command who give me these three detailed.


It's a MYSQL query against a wordpress db with "wp_" table prefix (the default)

SELECT wp_terms.`term_id` AS TagID, wp_terms.`name` AS TagName, SUM( tax.`count` ) AS TagPostCount
FROM `wp_terms`
INNER JOIN wp_term_taxonomy tax ON tax.term_id = wp_terms.term_id
GROUP BY wp_terms.`term_id`
0

精彩评论

暂无评论...
验证码 换一张
取 消