Docs: Correct usage examples for wpdb::prepare()
, which should not be called statically.
Props TJNowell. Fixes #37744. git-svn-id: https://develop.svn.wordpress.org/trunk@38289 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f05beeba8c
commit
4bf8693357
@ -1258,8 +1258,8 @@ class wpdb {
|
|||||||
*
|
*
|
||||||
* Both %d and %s should be left unquoted in the query string.
|
* 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 * 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 DATE_FORMAT(`field`, '%%c') FROM `table` WHERE `column` = %s", 'foo' );
|
||||||
*
|
*
|
||||||
* @link https://secure.php.net/sprintf Description of syntax.
|
* @link https://secure.php.net/sprintf Description of syntax.
|
||||||
* @since 2.3.0
|
* @since 2.3.0
|
||||||
|
Loading…
Reference in New Issue
Block a user