• Hi,
    I am getting following error :

    PHP Warning: mysqli_num_fields() expects parameter 1 to be mysqli_result, boolean given in /www/html/wp-includes/wp-db.php on line 3091.

    • This topic was modified 7 years, 7 months ago by Ligo George.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello
    how many plugins had you installed?
    do you know this error is reflect to any specific plugins?
    thanks

    Hello,
    I am getting the same error and it is breaking my site. I have centralized it to your plugin. No other plugins on my site call mysqli_fetch_field.

    This is the code in question: (File name: Enterprise_Dbcache_WpdbInjection_Cluster.php Line#: 518)

    $this->wpdb_mixin->result = mysqli_query( $query, $this->wpdb_mixin->dbh );

    Looks like the query results code is a little dyslexic.
    Should be:

    $this->wpdb_mixin->result = mysqli_query( $this->wpdb_mixin->dbh, $query );

    Please fix and issue and immediate update.
    Thank you.

    Best,
    designdrumm

    I have changed on my end and tested and this fixes this issue for me.

    Looks like you have multiples of these dyslexic queries.

    Found this one too:

    $this->wpdb_mixin->_last_found_rows_result = mysqli_query( "SELECT FOUND_ROWS()", $this->wpdb_mixin->dbh );

    Should be:

    $this->wpdb_mixin->_last_found_rows_result = mysqli_query( $this->wpdb_mixin->dbh, "SELECT FOUND_ROWS()" );

    After further searching, it looks like your use of any mysqli_(*) that requires the database handle are all set wrong. The database handle I believe has to be the first parameter. May want to comb your code again as it looks to be spread throughout your plugin.

    Look forward to an update. I enjoy your plugin.
    Thanks for your efforts!

    Best,
    designdrumm

    Correction, that did not fix it for me. Still same problem.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘mysqli_num_fields() expects parameter 1 to be mysqli_result’ is closed to new replies.