dbdelta
dbdelta ( $queries = '', $execute = true )
Parameters:- (string[]|string) queries Optional. The query to run. Can be multiple queries in an array, or a string of queries separated by semicolons. Default empty string.
- (bool) execute Optional. Whether or not to execute the query right away. Default true.
Returns:- (array) Strings containing the results of the various update queries.
Defined at:Change Log: - Introduced in WordPress: 1.5.0
- Deprecated in WordPress: —
Description
Modifies the database based on specified SQL statements.Useful for creating new tables and updating existing tables to a new structure.