WordPress-文章
是一个MySQL数据库表,表名为 yesapi_wp_posts,
共包含 23 个字段。
所属分类:cms。
该表提供了完整的字段定义、类型说明、默认值、索引设计和示例数据,可直接用于MySQL数据库建表。
💡 使用方式:复制下方SQL语句到MySQL客户端执行即可创建此表;也可通过果创云一键创建并生成RESTful API接口,免去手动部署。
MySQL数据库表结构设计
第 1-23 条, 共 23 条.
| 字段名称 | 字段类型 | 字段默认值 | 是否允许为空 | 字段描述 | 索引 | 字段数据示例 |
|---|---|---|---|---|---|---|
| ID | bigint(20) | 否 | 无索引 | |||
| post_author | bigint(20) | 0 | 否 | 普通索引 | 0 | |
| post_date | datetime | 0000-00-00 00:00:00 | 否 | 无索引 | 0000-00-00 00:00:00 | |
| post_date_gmt | datetime | 0000-00-00 00:00:00 | 否 | 无索引 | 0000-00-00 00:00:00 | |
| post_content | longtext | 否 | 无索引 | |||
| post_title | text | 否 | 无索引 | |||
| post_excerpt | text | 否 | 无索引 | |||
| post_status | varchar(20) | publish | 否 | 无索引 | publish | |
| comment_status | varchar(20) | open | 否 | 无索引 | open | |
| ping_status | varchar(20) | open | 否 | 无索引 | open | |
| post_password | varchar(255) | 否 | 无索引 | |||
| post_name | varchar(200) | 否 | 普通索引 | |||
| to_ping | text | 否 | 无索引 | |||
| pinged | text | 否 | 无索引 | |||
| post_modified | datetime | 0000-00-00 00:00:00 | 否 | 无索引 | 0000-00-00 00:00:00 | |
| post_modified_gmt | datetime | 0000-00-00 00:00:00 | 否 | 无索引 | 0000-00-00 00:00:00 | |
| post_content_filtered | longtext | 否 | 无索引 | |||
| post_parent | bigint(20) | 0 | 否 | 普通索引 | 0 | |
| guid | varchar(255) | 否 | 无索引 | |||
| menu_order | int(11) | 0 | 否 | 无索引 | 0 | |
| post_type | varchar(20) | post | 否 | 普通索引 | post | |
| post_mime_type | varchar(100) | 否 | 无索引 | |||
| comment_count | bigint(20) | 0 | 否 | 无索引 | 0 |
MySQL建表SQL语句
来源:WordPress-文章 | 链接:https://open.yesapi.cn/tablelist/yesapi_wp_posts.html
SQL
-- 数据库大全:WordPress-文章
-- 来源:YesApi.cn
CREATE TABLE `yesapi_wp_posts` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`ID` bigint(20) NOT NULL COMMENT '',
`post_author` bigint(20) NOT NULL DEFAULT '0' COMMENT '',
`post_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`post_date_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`post_content` longtext NOT NULL COMMENT '',
`post_title` text NOT NULL COMMENT '',
`post_excerpt` text NOT NULL COMMENT '',
`post_status` varchar(20) NOT NULL DEFAULT 'publish' COMMENT '',
`comment_status` varchar(20) NOT NULL DEFAULT 'open' COMMENT '',
`ping_status` varchar(20) NOT NULL DEFAULT 'open' COMMENT '',
`post_password` varchar(255) NOT NULL COMMENT '',
`post_name` varchar(200) NOT NULL COMMENT '',
`to_ping` text NOT NULL COMMENT '',
`pinged` text NOT NULL COMMENT '',
`post_modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`post_modified_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '',
`post_content_filtered` longtext NOT NULL COMMENT '',
`post_parent` bigint(20) NOT NULL DEFAULT '0' COMMENT '',
`guid` varchar(255) NOT NULL COMMENT '',
`menu_order` int(11) NOT NULL DEFAULT '0' COMMENT '',
`post_type` varchar(20) NOT NULL DEFAULT 'post' COMMENT '',
`post_mime_type` varchar(100) NOT NULL COMMENT '',
`comment_count` bigint(20) NOT NULL DEFAULT '0' COMMENT '',
KEY `post_author` (`post_author`),
KEY `post_name` (`post_name`),
KEY `post_parent` (`post_parent`),
KEY `post_type` (`post_type`),
PRIMARY KEY (`id`)
) ENGINE=InnoDB COMMENT 'WordPress-文章';
复制后,到数据库执行,即可创建此数据库表。
📖 如何使用 WordPress-文章 数据库表
- 手动建表:复制上方SQL语句,在MySQL客户端(如Navicat、phpMyAdmin、命令行)中执行即可
- 一键创建:点击「立即免费创建此表」按钮,果创云自动生成表和RESTful API接口
- API调用:创建表后,即可通过HTTP接口对数据进行增删改查操作
- 二次开发:支持自定义字段、添加业务逻辑、生成小程序/APP后端接口
❓ 常见问题
Q:WordPress-文章表的主键是什么?
A:主键为
id 字段,类型为 bigint(20) unsigned NOT NULL AUTO_INCREMENT,自增无符号整数。Q:如何在项目中使用这张表?
A:可以直接复制建表SQL到MySQL数据库中执行创建,也可以通过果创云平台一键创建并自动生成RESTful API接口,无需手动部署。
Q:这张表的索引有哪些?
A:post_author(普通索引)、post_name(普通索引)、post_parent(普通索引)、post_type(普通索引),以及主键索引(id)。
粤公网安备44011302002121号
|
