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

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

Props jrf.
Fixes #41983.



git-svn-id: https://develop.svn.wordpress.org/trunk@41660 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast 2017-10-02 00:21:06 +00:00
parent 38d5112c25
commit ea23ff3422
1 changed files with 3 additions and 2 deletions

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.