數據表分析
wp_posts(文章表)
表字段如下:
ID(文章ID)
post_author(文章作者名,我想可以是為用戶名,也可以是用戶ID)
post_date(文章發布日期)
post_date_gmt(文章發布日期,格林威治時間)
post_content(文章內容)
post_title(文章標題)
post_exerpt(摘錄)
post_status(文章狀態,publish/auto-draft/inherit)
comment_status(是否開啟評論,默認值為open,打開)
ping_status
post_password(文章密碼,如果加密的話,需要輸入對應的密碼才能打開)
post_name(文章縮略名)
to_ping(ping的鏈接)
pinged(已經PING過的鏈接)
post_modified(文章修改時間)
post_modified_gmt(文章修改時間,格林威治時間)
post_content_filter
post_parent(父文章,主要用於page)
guid
menu_order(排序ID)
post_type(文章類型,post或page)
post_mime_type(MIME類型)
comment_count(文章評論總數)
wp_postmeta(文章元數據)
表字段分析:
meta_id(文章元數據自增ID)
post_id(文章ID)
meta_key(元數據鍵)
meta_value(元數據值)
具體事例分析
以寫一篇文章為例
如圖:
頁面效果,如下:
在對應的數據表中我們看到如下數據:
這里顯示的是wp_postmeta表:
再看wp_posts表,如下(卻還是僅僅只有一條數據,關於這一點我有些疑惑不解):