警告:mysql_num_fields()期望参数1是资源,在第3026行的... wp-db.php中给出布尔值

时间:2016-08-06 20:45:05

标签: php wordpress

我不断收到以下行的错误: $ num_fields = mysql_num_fields($ this-> result);

在转到下一页时生成,但不是每次都生成:

http://www.easypings.com/recent-ping/

这是整个区域:

    /**
 * Retrieve the name of the function that called wpdb.
 *
 * Searches up the list of functions until it reaches
 * the one that would most logically had called this method.
 *
 * @since 2.5.0
 *
 * @return string|array The name of the calling function
 */
public function get_caller() {
    return wp_debug_backtrace_summary( __CLASS__ );
}

/**
 * Retrieves the MySQL server version.
 *
 * @since 2.7.0
 *
 * @return null|string Null on failure, version number on success.
 */
public function db_version() {
    if ( $this->use_mysqli ) {
        $server_info = mysqli_get_server_info( $this->dbh );
    } else {
        $server_info = mysql_get_server_info( $this->dbh );
    }
    return preg_replace( '/[^0-9.].*/', '', $server_info );
}

}

0 个答案:

没有答案