Analysis of the data table WordPress comments table (Function)

Analysis of the data table

wp_comments (comment form)

Figure I

The table fields as follows:
comment_ID (review ID)
comment_post_ID (review article ID)
comment_author (reviewer username)
comment_author_email (reviewer mailbox)
comment_author_url (reviewer blog the URL of)
comment_author_IP (Comments to access IP)
COMMENT_DATE (review date)
comment_date_gmt (comments Geni Lin GMT)
COMMENT_CONTENT (review)
comment_karma
comment_approved (review status, pending the equivalent of 0, 1 equivalent approval by, spam is equivalent to spam, trash is equivalent to the Recycle Bin, permanently deleted from the data table equivalent remove it)
comment_agent (what browser)
comment_type (comment type)
comment_parent (comments parent ID, determine whether there is a subset of this review, 0 default is not a subset)
user_id (user ID)

wp_commentmeta (Comments Metadata table)

Figure II
Table fields as follows:
meta_id (comment metadata increment ID)
the comment_id (Comments ID)
meta_key (metadata key)
meta_value (metadata values)

This review metadata tables, now I have not useful to them.

Specific examples of the analysis

To review an example:

Review articles

Figure I

Figure II

There are so several functions?
(1) a review of published articles, subject to the approval, in order to display;
(2) the corresponding article comments should be his son-class show, not a subset, all the way to equality, there are subsets, The default display tree;

comment list

Figure I

Can be drawn from the above the following functions:
(1) review the list of shows (as an administrator, to show all comments by default);
(2) there is a corresponding review of statistics, such as whole, pending, approved, garbage, trash and so on;
( 3) supports batch operations, such as the corresponding comments were approved;
(4) the corresponding article must also show that there are many comments, approved, pending etc;
(5) search function (this search looks just include the author ) name and comment content;
(6) the total number of statistical comments (statistics vary depending on conditions);

Guess you like

Origin www.cnblogs.com/youcong/p/11440642.html