Changeset 30546 for trunk/src/wp-includes/wp-db.php
- Timestamp:
- 11/24/2014 06:30:19 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/wp-db.php
r30400 r30546 1173 1173 * Both %d and %s should be left unquoted in the query string. 1174 1174 * 1175 * <code> 1176 * wpdb::prepare( "SELECT * FROM `table` WHERE `column` = %s AND `field` = %d", 'foo', 1337 ) 1177 * wpdb::prepare( "SELECT DATE_FORMAT(`field`, '%%c') FROM `table` WHERE `column` = %s", 'foo' ); 1178 * </code> 1175 * wpdb::prepare( "SELECT * FROM `table` WHERE `column` = %s AND `field` = %d", 'foo', 1337 ) 1176 * wpdb::prepare( "SELECT DATE_FORMAT(`field`, '%%c') FROM `table` WHERE `column` = %s", 'foo' ); 1179 1177 * 1180 1178 * @link http://php.net/sprintf Description of syntax. … … 1725 1723 * Insert a row into a table. 1726 1724 * 1727 * <code> 1728 * wpdb::insert( 'table', array( 'column' => 'foo', 'field' => 'bar' ) ) 1729 * wpdb::insert( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( '%s', '%d' ) ) 1730 * </code> 1725 * wpdb::insert( 'table', array( 'column' => 'foo', 'field' => 'bar' ) ) 1726 * wpdb::insert( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( '%s', '%d' ) ) 1731 1727 * 1732 1728 * @since 2.5.0 … … 1748 1744 * Replace a row into a table. 1749 1745 * 1750 * <code> 1751 * wpdb::replace( 'table', array( 'column' => 'foo', 'field' => 'bar' ) ) 1752 * wpdb::replace( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( '%s', '%d' ) ) 1753 * </code> 1746 * wpdb::replace( 'table', array( 'column' => 'foo', 'field' => 'bar' ) ) 1747 * wpdb::replace( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( '%s', '%d' ) ) 1754 1748 * 1755 1749 * @since 3.0.0 … … 1815 1809 * Update a row in the table 1816 1810 * 1817 * <code> 1818 * wpdb::update( 'table', array( 'column' => 'foo', 'field' => 'bar' ), array( 'ID' => 1 ) ) 1819 * wpdb::update( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( 'ID' => 1 ), array( '%s', '%d' ), array( '%d' ) ) 1820 * </code> 1811 * wpdb::update( 'table', array( 'column' => 'foo', 'field' => 'bar' ), array( 'ID' => 1 ) ) 1812 * wpdb::update( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( 'ID' => 1 ), array( '%s', '%d' ), array( '%d' ) ) 1821 1813 * 1822 1814 * @since 2.5.0 … … 1869 1861 * Delete a row in the table 1870 1862 * 1871 * <code> 1872 * wpdb::delete( 'table', array( 'ID' => 1 ) ) 1873 * wpdb::delete( 'table', array( 'ID' => 1 ), array( '%d' ) ) 1874 * </code> 1863 * wpdb::delete( 'table', array( 'ID' => 1 ) ) 1864 * wpdb::delete( 'table', array( 'ID' => 1 ), array( '%d' ) ) 1875 1865 * 1876 1866 * @since 3.4.0
Note: See TracChangeset
for help on using the changeset viewer.