Changeset 37086
- Timestamp:
- 03/27/2016 06:26:33 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/wp-db.php
r37085 r37086 1272 1272 * 1273 1273 * Example Prepared Statement: 1274 * $wild = '%'; 1275 * $find = 'only 43% of planets'; 1276 * $like = $wild . $wpdb->esc_like( $find ) . $wild; 1277 * $sql = $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE post_content LIKE '%s'", $like ); 1274 * 1275 * $wild = '%'; 1276 * $find = 'only 43% of planets'; 1277 * $like = $wild . $wpdb->esc_like( $find ) . $wild; 1278 * $sql = $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE post_content LIKE '%s'", $like ); 1278 1279 * 1279 1280 * Example Escape Chain: 1280 * $sql = esc_sql( $wpdb->esc_like( $input ) ); 1281 * 1282 * $sql = esc_sql( $wpdb->esc_like( $input ) ); 1281 1283 * 1282 1284 * @since 4.0.0
Note: See TracChangeset
for help on using the changeset viewer.