Title: Fatal error
Last modified: April 22, 2019

---

# Fatal error

 *  Resolved [Malae](https://wordpress.org/support/users/malae/)
 * (@malae)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-3184/)
 * Hi Rolf,
 * I am getting the the following errors on a WAMP site. The active site on hosting
   and other sites on WAMP have no problem. All are running PHP 7.2.
 *     ```
       ( ! ) Fatal error: Uncaught Error: Call to undefined method wpdb::get_results() in \wp-content\plugins\rvg-optimize-database\rvg-optimize-database.php on line 127
       ( ! ) Error: Call to undefined method wpdb::get_results() in \wp-content\plugins\rvg-optimize-database\rvg-optimize-database.php on line 127
       ```
   
 * Any idea why this is happening?

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

 *  Plugin Contributor [cageehv](https://wordpress.org/support/users/cageehv/)
 * (@cageehv)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-3184/#post-11453131)
 * Hey Malae,
 * Apparently, it must have something to do with your local PHP.ini settings or 
   your local database.
 * In the statement where the error shows up, the log table is created.
 * So, does, for instance, the local db user, that you use, have the CREATE TABLE
   permission?
 * peace,
    Rolf
 *  Thread Starter [Malae](https://wordpress.org/support/users/malae/)
 * (@malae)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-3184/#post-11453750)
 * Hi Rolf,
 * Thanks for your reply. What is puzzling is that this is only occurring with this
   one site on WAMP. I quickly get out of my depth when I encounter database issues
   and more so when it’s InnoDB, where you cannot repair tables, so decided to look
   at the PHP.
 * I added the code `global $wpdb;` before line 127 and the error disappeared. I
   then removed `global $wpdb;` and the problem has not returned! I assumed it may
   have be a temporary glitch, but you may understand better than I do.
 *  Plugin Contributor [cageehv](https://wordpress.org/support/users/cageehv/)
 * (@cageehv)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-3184/#post-11453783)
 * Hey malae,
 * Yes it definitely could have been a temporary thing.
 * Maybe a cache issue or so.
 * Anyways, glad it works now!
 * peace,
    Rolf

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

The topic ‘Fatal error’ is closed to new replies.

 * ![](https://ps.w.org/rvg-optimize-database/assets/icon-256x256.png?rev=3350597)
 * [Optimize Database after Deleting Revisions](https://wordpress.org/plugins/rvg-optimize-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/rvg-optimize-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/rvg-optimize-database/)
 * [Active Topics](https://wordpress.org/support/plugin/rvg-optimize-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/rvg-optimize-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/rvg-optimize-database/reviews/)

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)

 * 3 replies
 * 2 participants
 * Last reply from: [cageehv](https://wordpress.org/support/users/cageehv/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-3184/#post-11453783)
 * Status: resolved