WordPress Database Diagram สำหรับ WordPress 3.4

Database Description

WordPress เวอร์ชั่นนี้สนับสนุน MySQL เวอร์ชั่น 5.0.15 ขึ้นไป

Database Diagram

WordPress Database Diagram 3.4

Full resolution‎ (1,079 × 1,089 pixels, file size: 204 KB, MIME type: image/png)

Please note that within the standard installation of WordPress no integrity between the tables is enforced e.g. between posts and comments. If you are creating a plugin or extension that manipulates the WordPress database, your code should do the housekeeping so that no orphan records remain in the tables e.g. by removing records in other tables with a set of SQL commands when foreign keys are deleted (Don’t forget to remind users to backup before such operations).

Warning: ดาต้าเบส ไม่มีการกำหนด integrity

Example: เขียน query แสดง id และ หัวข้อเรื่อง ของเรื่องทั้งหมดที่จัดอยู่ใน category ที่ 5

[code language=”sql”]

SELECT id, post_title
FROM wp_posts
INNER JOIN wp_term_relationships
on wp_posts.id=wp_term_relationships.object_id
WHERE wp_term_relationships.term_taxonomy_id=5
ORDER BY wp_posts.id desc;

[/code]