Title: Problems with posts_join
Last modified: August 18, 2016

---

# Problems with posts_join

 *  [tedfox](https://wordpress.org/support/users/tedfox/)
 * (@tedfox)
 * [18 years, 8 months ago](https://wordpress.org/support/topic/problems-with-posts_join/)
 * In a plugin that I’m writing, I need to find out the terms of a post, so I’m 
   using the add_filter posts_join to do
 *     ```
       SELECT SQL_CALC_FOUND_ROWS wp2_posts. *
       FROM wp2_posts
       LEFT JOIN wp2_term_relationships ON ( wp2_posts.ID = wp2_term_relationships.object_id )
       ```
   
 * However, that doesn’t achieve anything.
 * I realise that if I run the following in sql itself, it gives me the tables that
   I need. can someone advise what i’m doing wrong?
 *     ```
       SELECT SQL_CALC_FOUND_ROWS *
       FROM wp2_posts
       LEFT JOIN wp2_term_relationships ON ( wp2_posts.ID = wp2_term_relationships.object_id )
       ```
   

The topic ‘Problems with posts_join’ is closed to new replies.

## Tags

 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)

 * 0 replies
 * 1 participant
 * Last reply from: [tedfox](https://wordpress.org/support/users/tedfox/)
 * Last activity: [18 years, 8 months ago](https://wordpress.org/support/topic/problems-with-posts_join/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
