Title: Database Errors in WordPress 3.9
Last modified: August 21, 2016

---

# Database Errors in WordPress 3.9

 *  Resolved [Pixelatic](https://wordpress.org/support/users/davidhealy/)
 * (@davidhealy)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/database-errors-in-wordpress-39/)
 * WordPress Store Locator is throwing the following error on the front end in WordPress
   3.9/PHP 5.5.9
 * `Warning: mysql_real_escape_string(): Access denied for user 'david'@'localhost'(
   using password: NO) in /var/www/wp-content/plugins/store-locator/sl-functions.
   php on line 324`
 * Line 324 of /var/www/wp-content/plugins/store-locator/sl-functions.php:
 * `$on_sl_page=$wpdb->get_results("SELECT post_name, post_content FROM ".SL_DB_PREFIX."
   posts WHERE LOWER(post_content) LIKE '%[store-locator%' AND post_status IN ('
   publish', 'draft') AND (post_name='$pagename' OR ID='".mysql_real_escape_string(
   $_GET['p'])."' OR ID='".mysql_real_escape_string($_GET['page_id'])."')", ARRAY_A);`
 * Traced to changes made to WPDB in 3.9 [http://make.wordpress.org/core/2014/04/07/mysql-in-wordpress-3-9/](http://make.wordpress.org/core/2014/04/07/mysql-in-wordpress-3-9/)
 * > For plugin developers, this means that you absolutely shouldn’t be using PHP’s
   > mysql_*() functions any more – you can use the equivalent WPDB functions instead.
 * > mysql_real_escape_string()
   >  For a drop in replacement, you can use esc_sql().
 * Hopefully this can get rolled out as a fix in the next release. Thanks, David
 * [https://wordpress.org/plugins/store-locator/](https://wordpress.org/plugins/store-locator/)

The topic ‘Database Errors in WordPress 3.9’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/store-locator_343c21.svg)
 * [Store Locator for WordPress with Google Maps – LotsOfLocales](https://wordpress.org/plugins/store-locator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/store-locator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/store-locator/)
 * [Active Topics](https://wordpress.org/support/plugin/store-locator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/store-locator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/store-locator/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Pixelatic](https://wordpress.org/support/users/davidhealy/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/database-errors-in-wordpress-39/)
 * Status: resolved