• I’m not sure where I should ask this question.

    I’m trying to write a posts_where/posts_join filter. I want to filter out all posts that have a certain meta-tag.

    Can anybody show me the SQL syntax for this ? What I need to tack on to the JOIN and/or WHERE clauses to get this to work ?

    I’m having problems with posts with multiple meta-tags. I want to “filter out” based on the existance of a meta-tag … and not “include” based on the existance of a metatag. The later would be much easier.

    Right now I have something like this:
    RIGHT JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id) where (meta_key IS NULL) or (meta_key != ‘dontshow’).

    The problem arises when a post has multiple meta-tags, and ends up getting selected because of another tag.

    Also, where is the place to talk about this, if not here ?

    The hackers mailing list is apparently invite only.

    TIA

  • The topic ‘SQL question ?’ is closed to new replies.