我终于找到了自定义的post类型数据。它存储在wp\\U post表中,其中post\\U type=自定义post类型(例如“产品”)。字段(列)数据存储在wp\\U Posteta中,其中meta\\u键是列名,meta\\u值是列值。
此查询将带回与自定义帖子类型“products”关联的所有数据:
SELECT P.ID, P.post_title, M.meta_key, M.meta_value
FROM wp_posts AS P
INNER JOIN wp_postmeta AS M ON M.post_id = P.ID
WHERE P.post_type = \'products\' and P.post_status = \'publish\'
ORDER BY post_title, meta_key