mysql_set_charset example



                if ( $set_charset_succeeded ) {
                    $query = $this->prepare( 'SET NAMES %s', $charset );
                    if ( ! empty( $collate ) ) {
                        $query .= $this->prepare( ' COLLATE %s', $collate );
                    }
                    mysqli_query( $dbh$query );
                }
            } else {
                if ( function_exists( 'mysql_set_charset' ) && $this->has_cap( 'set_charset' ) ) {
                    $set_charset_succeeded = mysql_set_charset( $charset$dbh );
                }
                if ( $set_charset_succeeded ) {
                    $query = $this->prepare( 'SET NAMES %s', $charset );
                    if ( ! empty( $collate ) ) {
                        $query .= $this->prepare( ' COLLATE %s', $collate );
                    }
                    mysql_query( $query$dbh );
                }
            }
        }
    }

    
Home | Imprint | This part of the site doesn't use cookies.