Title: Error while updating database settings
Last modified: August 30, 2016

---

# Error while updating database settings

 *  Resolved [Hemunt](https://wordpress.org/support/users/hemunt/)
 * (@hemunt)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/error-while-updating-database-settings/)
 * This is the error showing on my website. Can any1 help.
 *     ```
       PHP Warning:  mysql_set_charset(): Error executing query in D:\inetpub\vhosts\globalshospital.com\httpdocs\wp-includes\wp-db.php on line 780
       WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')) GROUP BY t1.event_hours_id ORDER BY FIELD(t3.menu_order,4,), t1.start, t1.end' at line 14 for query SELECT TIME_FORMAT(t1.start, '%H.%i') AS start, TIME_FORMAT(t1.end, '%H.%i') AS end, t1.event_id AS event_id, t1.before_hour_text AS description1, t1.after_hour_text AS description2, t2.post_title, t2.post_name, t3.post_title as weekday FROM wp_event_hours AS t1
       			LEFT JOIN wp_posts AS t2 ON t1.event_id=t2.ID
       			LEFT JOIN wp_posts AS t3 ON t1.weekday_id=t3.ID
       				WHERE
       			t2.post_type='events'
       			AND t2.post_status='publish'
       			AND
       			t3.post_type='timetable_weekdays'
       			AND
       			t3.post_status='publish'	AND(
       			(t3.menu_order=4
       			AND
       			SUBTIME(t1.start, TIME('07:06:57'))>0)
       			OR t3.menu_order IN()) GROUP BY t1.event_hours_id ORDER BY FIELD(t3.menu_order,4,), t1.start, t1.end LIMIT 5 made by require('D:\inetpub\vhosts\globalshospital.com\httpdocs\wp-blog-header.php'), require_once('D:\inetpub\vhosts\globalshospital.com\httpdocs\wp-includes\template-loader.php'), include('D:\inetpub\vhosts\globalshospital.com\httpdocs\wp-content\themes\imedica\page.php'), get_footer, locate_template, load_template, require_once('D:\inetpub\vhosts\globalshospital.com\httpdocs\wp-content\themes\imedica\footer.php'), get_footer, locate_template, load_template, require_once('D:\inetpub\vhosts\globalshospital.com\httpdocs\wp-content\themes\imedica\footer-default.php'), dynamic_sidebar, call_user_func_array, WP_Widget->display_callback, upcoming_events_widget->widget
       ```
   

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

 *  [David Alcaraz](https://wordpress.org/support/users/damses/)
 * (@damses)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/error-while-updating-database-settings/#post-6555444)
 * Hello,
    You have an error in your sql query
 * this it is wrong : FIELD(t3.menu_order,4,)
 * it must be FIELD(t3.menu_order,4)
 * or FIELD(t3.menu_order,4,0)
 * Regards
 *  Thread Starter [Hemunt](https://wordpress.org/support/users/hemunt/)
 * (@hemunt)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/error-while-updating-database-settings/#post-6555632)
 * Thank You … 🙂 Problem was solved
    🙂 🙂
 *  [alvinconrad](https://wordpress.org/support/users/alvinconrad/)
 * (@alvinconrad)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/error-while-updating-database-settings/#post-6555633)
 * Hi, could you explain how it was solved exactly…. having the same problem here.
   Much appreciated!

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

The topic ‘Error while updating database settings’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [php warnings](https://wordpress.org/support/topic-tag/php-warnings/)
 * [settings](https://wordpress.org/support/topic-tag/settings/)
 * [troubleshooting](https://wordpress.org/support/topic-tag/troubleshooting/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [alvinconrad](https://wordpress.org/support/users/alvinconrad/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/error-while-updating-database-settings/#post-6555633)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
