Docs: Correct usage examples for wpdb::prepare(), which should not be called statically.

Props TJNowell.
Fixes #37744.
Built from https://develop.svn.wordpress.org/trunk@38289


git-svn-id: http://core.svn.wordpress.org/trunk@38230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2016-08-20 13:17:30 +00:00
parent d30a6a988a
commit 597c067b67
2 changed files with 3 additions and 3 deletions

View File

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

View File

@ -1258,8 +1258,8 @@ class wpdb {
*
* Both %d and %s should be left unquoted in the query string.
*
* wpdb::prepare( "SELECT * FROM `table` WHERE `column` = %s AND `field` = %d", 'foo', 1337 )
* wpdb::prepare( "SELECT DATE_FORMAT(`field`, '%%c') FROM `table` WHERE `column` = %s", 'foo' );
* $wpdb->prepare( "SELECT * FROM `table` WHERE `column` = %s AND `field` = %d", 'foo', 1337 );
* $wpdb->prepare( "SELECT DATE_FORMAT(`field`, '%%c') FROM `table` WHERE `column` = %s", 'foo' );
*
* @link https://secure.php.net/sprintf Description of syntax.
* @since 2.3.0