Docs: Clarify the docs for wpdb::prepare().

Make the usage of the `%` wildcard in queries clearer.

Props jrf.
Fixes #41983.


Built from https://develop.svn.wordpress.org/trunk@41660


git-svn-id: http://core.svn.wordpress.org/trunk@41494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2017-10-02 00:22:45 +00:00
parent d5acf636b0
commit 5f19289fc2
2 changed files with 4 additions and 3 deletions

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-alpha-41659';
$wp_version = '4.9-alpha-41660';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -1201,8 +1201,9 @@ class wpdb {
*
* All placeholders MUST be left unquoted in the query string. A corresponding argument MUST be passed for each placeholder.
*
* Literal percentage signs (%) in the query string must be written as %%. Percentage wildcards (for example, to use in LIKE syntax)
* must be passed in the string argument, it cannot be inserted in the query string.
* Literal percentage signs (%) in the query string must be written as %%. Percentage wildcards (for example,
* to use in LIKE syntax) must be passed via a substitution argument containing the complete LIKE string, these
* cannot be inserted directly in the query string. Also see {@see esc_like()}.
*
* This method DOES NOT support sign, padding, alignment, width or precision specifiers.
* This method DOES NOT support argument numbering or swapping.