Core Function
View Source on Trac ↗ wp_get_db_schema()
wp_get_db_schema( mixed $scope = 'all', mixed $blog_id = null ) Retrieve the SQL for creating database tables.
Parameters 0 required
| Name / Type | Description |
|---|---|
| $scope string | Optional. The tables for which to retrieve SQL. Can be all, global, ms_global, or blog tables. Defaults to all. |
| $blog_id int | Optional. The site ID for which to retrieve SQL. Default is the current site ID. |
Return Value
(string)
The SQL needed to create the requested tables.
Function Information
Since Version
3.3.0
Source File
wp-admin/includes/schema.php
Advertisement