Changeset 35655 for trunk/src/wp-includes/wp-db.php
- Timestamp:
- 11/17/2015 06:12:08 AM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/wp-db.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/wp-db.php
r35544 r35655 2812 2812 } 2813 2813 2814 if ( $this->charset ) { 2815 $connection_charset = $this->charset; 2816 } else { 2817 if ( $this->use_mysqli ) { 2818 $connection_charset = mysqli_character_set_name( $this->dbh ); 2819 } else { 2820 $connection_charset = mysql_client_encoding(); 2821 } 2822 } 2823 2814 2824 if ( is_array( $value['length'] ) ) { 2815 $queries[ $col ] = $this->prepare( "CONVERT( LEFT( CONVERT( %s USING $charset ), %.0f ) USING {$this->charset})", $value['value'], $value['length']['length'] );2825 $queries[ $col ] = $this->prepare( "CONVERT( LEFT( CONVERT( %s USING $charset ), %.0f ) USING $connection_charset )", $value['value'], $value['length']['length'] ); 2816 2826 } else if ( 'binary' !== $charset ) { 2817 2827 // If we don't have a length, there's no need to convert binary - it will always return the same result. 2818 $queries[ $col ] = $this->prepare( "CONVERT( CONVERT( %s USING $charset ) USING {$this->charset})", $value['value'] );2828 $queries[ $col ] = $this->prepare( "CONVERT( CONVERT( %s USING $charset ) USING $connection_charset )", $value['value'] ); 2819 2829 } 2820 2830
Note: See TracChangeset
for help on using the changeset viewer.