WordPress SQL Query on Category/Terms

Posted by mroggle on Stack Overflow See other posts from Stack Overflow or by mroggle
Published on 2010-05-04T06:51:58Z Indexed on 2010/05/04 7:08 UTC
Read the original article Hit count: 257

Filed under:
|
|

Hi, i am modifying a plugin slightly to meet my needs, and need to change this query to return post ID's of just one category. I know it has something to do with INNER JOIN, but cant get the query right.

Here is the original query

$query = "SELECT ID as PID FROM $wpdb->posts";
$results = $wpdb->get_results($querydetails,ARRAY_A);

© Stack Overflow or respective owner

Related posts about Wordpress

Related posts about sql