Title: SQL error since moving servers
Last modified: August 21, 2016

---

# SQL error since moving servers

 *  [rascom](https://wordpress.org/support/users/rascom/)
 * (@rascom)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/sql-error-since-moving-servers/)
 * A friend of mine has just moved their website to a new hosting company. Since
   then they are not received emails submitted via a contact form but are getting
   the message
 * “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‘
   AND post_type=’page” at line 1 for query SELECT ID FROM wp_posts WHERE post_parent
   = AND post_type=’page’ made by require, require_once, include, get_header, locate_template,
   load_template, require_once, getMaxPossibleDepth.”
 * The entire contents of the original website were put into a Tarball and transferred
   across including all of the databases so everything should be exactly the same.
 * They have asked me to take a look as I know a bit about IT stuff but haven’t 
   touched WordPress before although am interested in developing more of a knowledge
   of it.
 * Any suggestions anyone?

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/sql-error-since-moving-servers/#post-4358196)
 * Are any emails received – eg. comment notifications etc?
 *  Thread Starter [rascom](https://wordpress.org/support/users/rascom/)
 * (@rascom)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/sql-error-since-moving-servers/#post-4358201)
 * They don’t allow comments on any posts they put up etc. so nothing would go through
   that way anyway.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/sql-error-since-moving-servers/#post-4358272)
 * What about when a new user is registered?

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

The topic ‘SQL error since moving servers’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/sql-error-since-moving-servers/#post-4358272)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
