select guid
from wp_posts,wp_term_relationships,wp_term_taxonomy
where ID=object_id
and wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id
and post_type=”post”
and post_status = “publish”
and wp_term_relationships.term_taxonomy_id = 9
and taxonomy = “category”

改term_taxonomy_id = 9 的ID即可