mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-05 05:04:31 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user