Make WordPress Core

Ticket #18407: 18407.patch

File 18407.patch, 5.2 KB (added by dllh, 13 years ago)

Patch to update wp-db.php docs

  • wp-db.php

     
    843843         *
    844844         * The following directives can be used in the query format string:
    845845         *   %d (integer)
     846         *   %f (float)
    846847         *   %s (string)
    847848         *   %% (literal percentage sign - no argument needed)
    848849         *
    849          * Both %d and %s are to be left unquoted in the query string and they need an argument passed for them.
     850         * All of %d, %f, and %s are to be left unquoted in the query string and they need an argument passed for them.
    850851         * Literals (%) as parts of the query must be properly written as %%.
    851852         *
    852          * This function only supports a small subset of the sprintf syntax; it only supports %d (integer), %s (string).
     853         * This function only supports a small subset of the sprintf syntax; it only supports %d (integer), %f (float), and %s (string).
    853854         * Does not support sign, padding, alignment, width or precision specifiers.
    854855         * Does not support argument numbering/swapping.
    855856         *
     
    11321133         * @param string $table table name
    11331134         * @param array $data Data to insert (in column => value pairs). Both $data columns and $data values should be "raw" (neither should be SQL escaped).
    11341135         * @param array|string $format Optional. An array of formats to be mapped to each of the value in $data. If string, that format will be used for all of the values in $data.
    1135          *      A format is one of '%d', '%s' (integer, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
     1136         *      A format is one of '%d', '%f', '%s' (integer, float, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
    11361137         * @return int|false The number of rows inserted, or false on error.
    11371138         */
    11381139        function insert( $table, $data, $format = null ) {
     
    11551156         * @param string $table table name
    11561157         * @param array $data Data to insert (in column => value pairs). Both $data columns and $data values should be "raw" (neither should be SQL escaped).
    11571158         * @param array|string $format Optional. An array of formats to be mapped to each of the value in $data. If string, that format will be used for all of the values in $data.
    1158          *      A format is one of '%d', '%s' (integer, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
     1159         *      A format is one of '%d', '%f', '%s' (integer, float, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
    11591160         * @return int|false The number of rows affected, or false on error.
    11601161         */
    11611162        function replace( $table, $data, $format = null ) {
     
    11761177         * @param string $table table name
    11771178         * @param array $data Data to insert (in column => value pairs).  Both $data columns and $data values should be "raw" (neither should be SQL escaped).
    11781179         * @param array|string $format Optional. An array of formats to be mapped to each of the value in $data. If string, that format will be used for all of the values in $data.
    1179          *      A format is one of '%d', '%s' (integer, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
     1180         *      A format is one of '%d', '%f', '%s' (integer, float, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
    11801181         * @return int|false The number of rows affected, or false on error.
    11811182         */
    11821183        function _insert_replace_helper( $table, $data, $format = null, $type = 'INSERT' ) {
     
    12151216         * @param array $data Data to update (in column => value pairs). Both $data columns and $data values should be "raw" (neither should be SQL escaped).
    12161217         * @param array $where A named array of WHERE clauses (in column => value pairs). Multiple clauses will be joined with ANDs. Both $where columns and $where values should be "raw".
    12171218         * @param array|string $format Optional. An array of formats to be mapped to each of the values in $data. If string, that format will be used for all of the values in $data.
    1218          *      A format is one of '%d', '%s' (integer, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
    1219          * @param array|string $format_where Optional. An array of formats to be mapped to each of the values in $where. If string, that format will be used for all of the items in $where.  A format is one of '%d', '%s' (integer, string).  If omitted, all values in $where will be treated as strings.
     1219         *      A format is one of '%d', '%f', '%s' (integer, float, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
     1220         * @param array|string $format_where Optional. An array of formats to be mapped to each of the values in $where. If string, that format will be used for all of the items in $where.  A format is one of '%d', '%f', '%s' (integer, float, string).  If omitted, all values in $where will be treated as strings.
    12201221         * @return int|false The number of rows updated, or false on error.
    12211222         */
    12221223        function update( $table, $data, $where, $format = null, $where_format = null ) {