Title: MySQL wp_query help
Last modified: August 20, 2016

---

# MySQL wp_query help

 *  [MountainDrew](https://wordpress.org/support/users/mountaindrew/)
 * (@mountaindrew)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/mysql-wp_query-help/)
 * I would like some help in creating a SQL statement that will query my WordPress
   database and return results based on search terms a user enters.
 * Basically it would be like this.
 * User term 1 (general string)
    User term 2 (zip code)
 * Return results if general string and/or zip code is found in either the title,
   description of the post, or the category of the post.
 * The hard part (for me) is getting the category part.
 * My guess is that it would be a simple SELECT statement with an INNER JOIN, but
   I my SQL skills are very limited.
 * Any help would be greatly appreciated.

The topic ‘MySQL wp_query help’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [MountainDrew](https://wordpress.org/support/users/mountaindrew/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/mysql-wp_query-help/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
