WordPress.org

Ready to get started?Download WordPress

Forums

sql request syntax (2 posts)

  1. grosbouff
    Member
    Posted 6 years ago #

    Hello, is my syntax correct ? I would like to retrive the post that has a metakey 'intro' having '1' as value.
    This is from plugin get-a-post, but i'm not sure it's working.

    SELECT * FROM wp_posts, wp_postmeta WHERE post_date <= '2007-09-29 02:41:16' AND ID = post_id AND meta_key = 'intro' AND meta_value = 1 ORDER BY post_date DESC LIMIT 1

  2. MichaelH
    Member
    Posted 6 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.