From e91e6de814f51b639837d0c430a0e0da35883084 Mon Sep 17 00:00:00 2001 From: dd32 Date: Fri, 19 Aug 2011 15:01:35 +0000 Subject: [PATCH] Clarify %d is an integer in wpdb documentation. See #18407 git-svn-id: http://svn.automattic.com/wordpress/trunk@18573 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/wp-db.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index 0cae3e638..5d243fbfd 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -842,14 +842,14 @@ class wpdb { * Prepares a SQL query for safe execution. Uses sprintf()-like syntax. * * The following directives can be used in the query format string: - * %d (decimal number) + * %d (integer) * %s (string) * %% (literal percentage sign - no argument needed) * * Both %d and %s are to be left unquoted in the query string and they need an argument passed for them. * Literals (%) as parts of the query must be properly written as %%. * - * This function only supports a small subset of the sprintf syntax; it only supports %d (decimal number), %s (string). + * This function only supports a small subset of the sprintf syntax; it only supports %d (integer), %s (string). * Does not support sign, padding, alignment, width or precision specifiers. * Does not support argument numbering/swapping. * @@ -1132,7 +1132,7 @@ class wpdb { * @param string $table table name * @param array $data Data to insert (in column => value pairs). Both $data columns and $data values should be "raw" (neither should be SQL escaped). * @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. - * A format is one of '%d', '%s' (decimal number, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types. + * 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. * @return int|false The number of rows inserted, or false on error. */ function insert( $table, $data, $format = null ) { @@ -1155,7 +1155,7 @@ class wpdb { * @param string $table table name * @param array $data Data to insert (in column => value pairs). Both $data columns and $data values should be "raw" (neither should be SQL escaped). * @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. - * A format is one of '%d', '%s' (decimal number, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types. + * 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. * @return int|false The number of rows affected, or false on error. */ function replace( $table, $data, $format = null ) { @@ -1176,7 +1176,7 @@ class wpdb { * @param string $table table name * @param array $data Data to insert (in column => value pairs). Both $data columns and $data values should be "raw" (neither should be SQL escaped). * @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. - * A format is one of '%d', '%s' (decimal number, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types. + * 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. * @return int|false The number of rows affected, or false on error. */ function _insert_replace_helper( $table, $data, $format = null, $type = 'INSERT' ) { @@ -1215,8 +1215,8 @@ class wpdb { * @param array $data Data to update (in column => value pairs). Both $data columns and $data values should be "raw" (neither should be SQL escaped). * @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". * @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. - * A format is one of '%d', '%s' (decimal number, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types. - * @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' (decimal number, string). If omitted, all values in $where will be treated as strings. + * 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. + * @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. * @return int|false The number of rows updated, or false on error. */ function update( $table, $data, $where, $format = null, $where_format = null ) {