Title: Database Caching Issue (mysqli_num_fields())
Last modified: April 7, 2021

---

# Database Caching Issue (mysqli_num_fields())

 *  Resolved [akashmughal21](https://wordpress.org/support/users/akashmughal21/)
 * (@akashmughal21)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/database-caching-issue-mysqli_num_fields/)
 * Hi,
 * I am using W3TC plugin for 2 years on many of my sites and it is the best caching
   plugin.
 * On one of my sites, I am using Database Caching for a long. However, recently
   I just noticed that a Warning appears on only a few of my blog posts after H1
   and Meta.
 * > Warning: mysqli_num_fields() expects parameter 1 to be mysqli_result, bool 
   > given in /home/customer/www/templatesfreedownload.com/public_html/wp-includes/
   > wp-db.php on line 3402
 * Disabling the Database Caching resolves the issue. However, I want to use the
   Database caching feature as well. WOuld you please help me to resolve the issue
   without turning it off?
 * Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/database-caching-issue-mysqli_num_fields/#post-14287028)
 * Hello [@akashmughal21](https://wordpress.org/support/users/akashmughal21/)
 * I am sorry about the issue you are experiencing and I am happy to assist you 
   with this.
    Can you please share if you are on a shared served or VPS/Dedicated
   and if the caching method you are using for DB caching is set to Disk? ALso, 
   have you tried purging the DB Cache? Thanks!
 *  Thread Starter [akashmughal21](https://wordpress.org/support/users/akashmughal21/)
 * (@akashmughal21)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/database-caching-issue-mysqli_num_fields/#post-14288891)
 * Hi [@vmarko](https://wordpress.org/support/users/vmarko/),
 * We are using a Shared Server and yes the caching method is set to Disk.
 * Yes, I have tried purging all the caches again and again. Also, uninstalling 
   and reinstalling the plugin. But nothing worked.
 * Thanks!
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/database-caching-issue-mysqli_num_fields/#post-14288985)
 * Hello [@akashmughal21](https://wordpress.org/support/users/akashmughal21/)
 * Thank you for the info.
 * WordPress website utilizes database quite a lot. And database caching allows 
   decreasing database usage. Database caching allows to cache database request 
   results.
 * Database caching can make your site faster if the time needed to get data from
   the database is more than the time needed to get data from the cache.
 * So, if you are on shared hosting, then memory-based caching is likely to be unavailable
   for you. And disk-based caching is not that efficient. In other words, if you
   are on shared hosting, it’s recommended not to use database caching.
 * Moreover, using disk-database caching (on shared hosting) can make your site 
   slower. This is so because getting data from the database can be faster than 
   getting cached data from the disk.
 * So I would advise disabling the Database cache in your case.
 * Thanks!
 *  Thread Starter [akashmughal21](https://wordpress.org/support/users/akashmughal21/)
 * (@akashmughal21)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/database-caching-issue-mysqli_num_fields/#post-14289179)
 * Hi [@vmarko](https://wordpress.org/support/users/vmarko/)
 * Thanks for the detailed information.
 * I have a Memcached feature available with my hosting plan.
 * Do you recommend me to use Memcaching for Page, Object, and Database Caching?
 * Thanks.
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/database-caching-issue-mysqli_num_fields/#post-14289439)
 * Hello [@akashmughal21](https://wordpress.org/support/users/akashmughal21/)
 * Yes, It’s best to use memory-based caching for DB and/or Object Caching.
    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Database Caching Issue (mysqli_num_fields())’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/database-caching-issue-mysqli_num_fields/#post-14289439)
 * Status: resolved