WordPress.org

Ready to get started?Download WordPress

Forums

mysql query question (4 posts)

  1. Jaxxx
    Member
    Posted 8 years ago #

    sorry if this is OT, but is there any way to make the following mysql code simpler?

    SELECT * FROM wp_posts WHERE ID=1 OR ID=15 OR ID=16 OR ID=17 OR ID=18

    etc...

  2. moshu
    Member
    Posted 8 years ago #

    What about asking it here: http://forums.mysql.com/ ?

  3. Jaxxx
    Member
    Posted 8 years ago #

    good idea

  4. McShelby
    Member
    Posted 8 years ago #

    This may also work:

    SELECT * FROM wp_posts WHERE id IN (1, 15, 16, 17, 18);

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags