Make WordPress Core


Ignore:
Timestamp:
06/29/2025 08:53:29 PM (11 months ago)
Author:
johnbillion
Message:

Docs: Documentation and i18n string improvements relating to MySQL and server requirements.

See #63166

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wpdb.php

    r60254 r60363  
    4444 * access to the WordPress database.
    4545 *
    46  * It is possible to replace this class with your own by setting the $wpdb global variable
     46 * It is possible to replace the global instance with your own by setting the $wpdb global variable
    4747 * in wp-content/db.php file to your class. The wpdb class will still be included, so you can
    4848 * extend it or simply use your own.
     
    238238     *
    239239     * You can set this to have multiple WordPress installations in a single database.
    240      * The second reason is for possible security precautions.
    241240     *
    242241     * @since 2.5.0
     
    942941     * Changes the current SQL mode, and ensures its WordPress compatibility.
    943942     *
    944      * If no modes are passed, it will ensure the current MySQL server modes are compatible.
     943     * If no modes are passed, it will ensure the current SQL server modes are compatible.
    945944     *
    946945     * @since 3.9.0
     
    13701369
    13711370    /**
    1372      * Quotes an identifier for a MySQL database, e.g. table/field names.
     1371     * Quotes an identifier such as a table or field name.
    13731372     *
    13741373     * @since 6.2.0
     
    14341433     *         "SELECT DATE_FORMAT(`field`, '%%c') FROM `table` WHERE `column` = %s",
    14351434     *         'foo'
     1435     *     );
     1436     *
     1437     *     $wpdb->prepare(
     1438     *         "SELECT * FROM %i WHERE %i = %s",
     1439     *         $table,
     1440     *         $field,
     1441     *         $value
    14361442     *     );
    14371443     *
     
    19581964
    19591965        /*
    1960          * Set the MySQLi error reporting off because WordPress handles its own.
     1966         * Switch error reporting off because WordPress handles its own.
    19611967         * This is due to the default value change from `MYSQLI_REPORT_OFF`
    19621968         * to `MYSQLI_REPORT_ERROR|MYSQLI_REPORT_STRICT` in PHP 8.1.
     
    21012107
    21022108        $host = ! empty( $matches['host'] ) ? $matches['host'] : '';
    2103         // MySQLi port cannot be a string; must be null or an integer.
     2109        // Port cannot be a string; must be null or an integer.
    21042110        $port = ! empty( $matches['port'] ) ? absint( $matches['port'] ) : null;
    21052111
     
    22912297            $this->last_error = mysqli_error( $this->dbh );
    22922298        } else {
    2293             $this->last_error = __( 'Unable to retrieve the error message from MySQL' );
     2299            $this->last_error = __( 'Unable to retrieve the error message from the database server' );
    22942300        }
    22952301
     
    34743480
    34753481    /**
    3476      * Checks if the query is accessing a collation considered safe on the current version of MySQL.
     3482     * Checks if the query is accessing a collation considered safe.
    34773483     *
    34783484     * @since 4.2.0
     
    39883994
    39893995    /**
    3990      * Determines whether MySQL database is at least the required minimum version.
     3996     * Determines whether the database server is at least the required minimum version.
    39913997     *
    39923998     * @since 2.5.0
    39933999     *
    3994      * @global string $required_mysql_version The required MySQL version string.
     4000     * @global string $required_mysql_version The minimum required MySQL version string.
    39954001     * @return void|WP_Error
    39964002     */
     
    40484054     * Capability sniffs for the database server and current version of WPDB.
    40494055     *
    4050      * Database sniffs are based on the version of MySQL the site is using.
     4056     * Database sniffs are based on the version of the database server in use.
    40514057     *
    40524058     * WPDB sniffs are added as new features are introduced to allow theme and plugin
     
    41204126
    41214127    /**
    4122      * Retrieves the database server version.
     4128     * Retrieves the database server version number.
    41234129     *
    41244130     * @since 2.7.0
     
    41314137
    41324138    /**
    4133      * Returns the version of the MySQL server.
     4139     * Returns the raw version string of the database server.
    41344140     *
    41354141     * @since 5.5.0
    41364142     *
    4137      * @return string Server version as a string.
     4143     * @return string Database server version as a string.
    41384144     */
    41394145    public function db_server_info() {
Note: See TracChangeset for help on using the changeset viewer.