Title: SQL Sytax Error
Last modified: August 18, 2016

---

# SQL Sytax Error

 *  [lpxxfaintxx](https://wordpress.org/support/users/lpxxfaintxx/)
 * (@lpxxfaintxx)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/sql-sytax-error/)
 * I keep on getting the following error after installing the “Other Posts from 
   Cat” plugin:
 * **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 wp_posts.ID = wp_term_relationships.object_id AND wp_term_relationships.’
   at line 7]
 * SELECT DISTINCT ID, post_title, post_date, wp_terms.term_id as post_category 
   FROM wp_posts, wp_terms, wp_term_relationships, wp_term_taxonomy WHERE wp_terms.
   term_id = AND wp_posts.ID = wp_term_relationships.object_id AND wp_term_relationships.
   term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id AND wp_term_taxonomy.term_id
   = wp_terms.term_id AND ID != 500 AND post_status = ‘publish’ ORDER BY post_date
   DESC LIMIT 400
 * Any idea what’s wrong?

The topic ‘SQL Sytax Error’ is closed to new replies.

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [lpxxfaintxx](https://wordpress.org/support/users/lpxxfaintxx/)
 * Last activity: [18 years, 6 months ago](https://wordpress.org/support/topic/sql-sytax-error/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
