绿站
绿色文摘
今天是:

交流 | 搜索 | +发贴

WordPress 数据表之间的关系
nydalu 2024年5月22日 529次

大多数数据表通过一个字段链接到了一个或多个数据表,这个字段一般是这个数据表的唯一数据,熟悉数据库的人肯定知道,这个数据就是 ID,如某个文章的 post_id,这些链接关系如下表:

数据表 存储的数据 关联到
wp_posts 文章、页面、附件、版本、导航菜单项目 wp_postmeta (通过post_id关联)
wp_term_relationships(通过post_id关联)
wp_postmeta 每个文章的元数据 wp_posts (通过 post_id关联)
wp_comments 评论 wp_posts (通过 post_id 关联)
wp_commentmeta 评论元数据 wp_comments (通过comment_id 关联)
wp_term_relationships 文章和自定义分类法之间的关系 wp_posts (通过 post_id 关联)
wp_term_taxonomy (通过term_taxonomy_id 关联)
wp_term_taxonomy 自定义分类法(包括默认的分类目录和标签) wp_term_relationships(通过 term_taxonomy_id关联)
wp_terms 关联到分类法中的分类目录,标签和自定义分类项目 wp_term_taxonomy (通过term_id 关联)
wp_links 博客连接(已弃用,可以不用考虑) wp_term_relationships(通过 link_id 关联)
wp_users 用户 wp_posts (通过post_author 关联)
wp_user_meta 每个用户的元数据 wp_users (通过 user_id 关联)
wp_options 网站设置和选项 (通过 WordPress 后台、主题、或插件设置) 独立的,不与其他任何数据表关联

开始之前,有一些需要注意的事项需要告诉大家。

链接内容到数据表

了解了 WordPress 内容结构和数据表,现在是把他们对应起来的时候了下,表显示了每个数据表被用来存储哪种类型的内容。

内容类型 数据表
文章 wp_posts
页面 wp_posts
自定义文章类型 wp_posts
附件 wp_posts
链接 wp_links
导航菜单 wp_posts
分类目录 wp_terms
标签 wp_terms
自定义分类法 wp_term_taxonomy
分类项目 wp_terms
文章元数据 wp_post_meta
小工具 wp_options
设置选项 wp_options
用户 wp_users
文章正文 wp_posts (如果添加了文章)
wp_options (如果添加了小工具)
主题和插件文件 (硬编码的)
其他内容 wp_posts (如果添加了文章)
wp_options (如果添加了小工具)
主题和插件文件 (硬编码的)

你可能会注意到并不是所有的数据表都在上表中出现了,在这些没有出现的数据中,并不存储实际的数据,而是作为辅助性的数据表,存储着一些关于这些数据的关系。


  • nydalu 24-06-18 11:35  

    shishi


  • nydalu 24-06-23 14:12  

    zaishiyixia


  • zcxevcetcb 24-10-22 19:55  

    Muchas gracias. ?Como puedo iniciar sesion?


  • droversointeru 24-12-28 19:00  

    Some really interesting information, well written and broadly user genial.

    https://www.droversointeru.com


  • Maria Avner 25-01-24 20:50  

    “This is a topic close to my heart cheers, where are your contact details though?”

    https://classicbedsheet.pk


  • Watch Live NFLStream Online 25-04-06 06:51  

    I really appreciate this post. I¦ve been looking everywhere for this! Thank goodness I found it on Bing. You’ve made my day! Thank you again

    https://nflbox.me/nfl-2024-streams


  • drover sointeru 25-04-10 10:48  

    I keep listening to the news update lecture about receiving free online grant applications so I have been looking around for the best site to get one. Could you advise me please, where could i get some?

    https://www.droversointeru.com


  • * * * Claim Free iPhone 16: http://emrsparkhela.com/index.php?vmwhgx * * * hs=40d604795bd89b445630d087b0cab220* ххх* 25-05-24 13:14  

    iofn19


  • Toccara Magaddino 25-06-02 01:29  

    Someone essentially lend a hand to make critically posts I might state. That is the very first time I frequented your website page and up to now? I amazed with the analysis you made to create this particular submit incredible. Fantastic task!

    https://www.zoritolerimol.com


  • 📟 Notification: TRANSACTION 1,330717 BTC. Go to withdrawal =>> https://yandex.com/poll/WDrLYhyq1Mc7jMHFgAW85q?hs=40d604795bd89b445630d087b0cab220& 📟 25-06-09 19:32  

    hq11qi


  • 🖥 + 1.765530 BTC.GET - https://graph.org/Payout-from-Blockchaincom-06-26?hs=40d604795bd89b445630d087b0cab220& 🖥 25-07-01 00:10  

    aazb65


  • 🔐 + 1.56438 BTC.NEXT - https://graph.org/Payout-from-Blockchaincom-06-26?hs=40d604795bd89b445630d087b0cab220& 🔐 25-07-11 11:30  

    w5dz6p


  • 🔏 Reminder- SENDING 1,484943 BTC. GET => https://graph.org/Payout-from-Blockchaincom-06-26?hs=40d604795bd89b445630d087b0cab220& 🔏 25-07-13 23:21  

    wo02af


  • 🔨 Message; TRANSACTION 1.501544 BTC. Get =>> https://graph.org/Payout-from-Blockchaincom-06-26?hs=40d604795bd89b445630d087b0cab220& 🔨 25-07-20 10:35  

    ywri3c


  • 📟 🏆 Bitcoin Reward - 0.5 BTC added. Collect now >> https://graph.org/WITHDRAW-YOUR-COINS-07-23?hs=40d604795bd89b445630d087b0cab220& 📟 25-07-24 10:25  

    7m3v35


  • 📓 🚨 WARNING: You received 0.75 BTC! Go to receive >> https://graph.org/RECEIVE-BTC-07-23?hs=40d604795bd89b445630d087b0cab220& 📓 25-07-28 16:53  

    w23xv7


  • 📕 Account Alert: 1.9 Bitcoin transfer requested. Confirm? => https://graph.org/TAKE-YOUR-BITCOIN-07-23?hs=40d604795bd89b445630d087b0cab220& 📕 25-08-13 09:48  

    3lxnqv


  • 🖥 ❗ Critical: 2.0 BTC transaction failed. Retry now > https://graph.org/RECOVER-BITCOIN-07-23?hs=40d604795bd89b445630d087b0cab220& 🖥 25-08-31 15:39  

    bjwtgy


  • 📎 🎉 Special Deal - 1.25 BTC reward waiting. Get today → https://graph.org/WITHDRAW-DIGITAL-FUNDS-07-23?hs=40d604795bd89b445630d087b0cab220& 📎 25-09-01 00:52  

    w7iskb


  • 🔩 ACCOUNT ALERT - Suspicious transfer of 1.5 Bitcoin. Cancel? > https://graph.org/COLLECT-BTC-07-23?hs=40d604795bd89b445630d087b0cab220& 🔩 25-09-04 18:20  

    lwd2st


  • 🔓 🔔 Alert - 0.9 BTC expiring. Go to wallet >> https://graph.org/Get-your-BTC-09-04?hs=40d604795bd89b445630d087b0cab220& 🔓 25-10-22 10:41  

    d9jif0


  • 888slot con 25-11-28 23:16  

    Nhà Cái xn88 có uy tín không sở hữu số lượng thành viên tham gia siêu khủng bởi hệ thống vận hành chuyên nghiệp, mang lại cơ hội khám phá sản phẩm đặc sắc đa dạng trên thị trường. Thương hiệu cung cấp các sảnh cược nổi tiếng như: Bắn Cá, Casino Trực Tuyến, Thể Thao, Đá Gà, Nổ Hũ


  • 888slot app 25-12-01 13:39  

    Thông qua hệ thống tường lửa WAF 5 lớp và công nghệ mã xác thực 2AF, nhà cái 66b ẩn danh tuyệt đối mọi tài khoản người chơi đồng thời, mã hóa toàn bộ hoạt động khi hội viên truy cập, sử dụng dịch vụ, sản phẩm. Vì thế, bạn hoàn toàn có thể yên tâm khi cá cược tại đây.



  • 关于 ·登录·管理
    加载1.013 查询 16