Code Duplication    Length = 6-6 lines in 2 locations

src/wp-includes/wp-db.php 2 locations

@@ 826-831 (lines=6) @@
823
					$set_charset_succeeded = mysqli_set_charset( $dbh, $charset );
824
				}
825
826
				if ( $set_charset_succeeded ) {
827
					$query = $this->prepare( 'SET NAMES %s', $charset );
828
					if ( ! empty( $collate ) )
829
						$query .= $this->prepare( ' COLLATE %s', $collate );
830
					mysqli_query( $dbh, $query );
831
				}
832
			} else {
833
				if ( function_exists( 'mysql_set_charset' ) && $this->has_cap( 'set_charset' ) ) {
834
					$set_charset_succeeded = mysql_set_charset( $charset, $dbh );
@@ 836-841 (lines=6) @@
833
				if ( function_exists( 'mysql_set_charset' ) && $this->has_cap( 'set_charset' ) ) {
834
					$set_charset_succeeded = mysql_set_charset( $charset, $dbh );
835
				}
836
				if ( $set_charset_succeeded ) {
837
					$query = $this->prepare( 'SET NAMES %s', $charset );
838
					if ( ! empty( $collate ) )
839
						$query .= $this->prepare( ' COLLATE %s', $collate );
840
					mysql_query( $query, $dbh );
841
				}
842
			}
843
		}
844
	}