+ $this->init_charset();
+
+ $this->dbuser = $dbuser;
+ $this->dbpassword = $dbpassword;
+ $this->dbname = $dbname;
+ $this->dbhost = $dbhost;
+
+ $this->db_connect();
+ }
+
+ /**
+ * PHP5 style destructor and will run when database object is destroyed.
+ *
+ * @see wpdb::__construct()
+ * @since 2.0.8
+ * @return bool true
+ */
+ function __destruct() {
+ return true;
+ }
+
+ /**
+ * PHP5 style magic getter, used to lazy-load expensive data.
+ *
+ * @since 3.5.0
+ *
+ * @param string $name The private member to get, and optionally process
+ * @return mixed The private member
+ */
+ function __get( $name ) {
+ if ( 'col_info' == $name )
+ $this->load_col_info();
+
+ return $this->$name;
+ }
+
+ /**
+ * Magic function, for backwards compatibility
+ *
+ * @since 3.5.0
+ *
+ * @param string $name The private member to set
+ * @param mixed $value The value to set
+ */
+ function __set( $name, $value ) {
+ $this->$name = $value;
+ }
+
+ /**
+ * Magic function, for backwards compatibility
+ *
+ * @since 3.5.0
+ *
+ * @param string $name The private member to check
+ *
+ * @return bool If the member is set or not
+ */
+ function __isset( $name ) {
+ return isset( $this->$name );
+ }
+
+ /**
+ * Magic function, for backwards compatibility
+ *
+ * @since 3.5.0
+ *
+ * @param string $name The private member to unset
+ */
+ function __unset( $name ) {
+ unset( $this->$name );
+ }
+
+ /**
+ * Set $this->charset and $this->collate
+ *
+ * @since 3.1.0
+ */
+ function init_charset() {
+ if ( function_exists('is_multisite') && is_multisite() ) {