mySQL field=ALL equivalent in WP? (3 posts)

  1. ixwa
    Posted 5 years ago #

    I have a multi-select form doing its thing, but I want some of the options to be...optional and to return all posts results regardless of that particular field's value.

    Is there an equivalent to mySQL field=ALL?

    I thought maybe leaving it blank would accomplish this, but I'm not sure about the results I'm getting.

  2. vtxyzzy
    Posted 5 years ago #

    If you can use the 'LIKE' operator rather than just an equals, try using a single percent sign for the value: '%'

    field LIKE '%'

  3. ixwa
    Posted 5 years ago #

    Hmm, good suggestion; will report back.

Topic Closed

This topic has been closed to new replies.

About this Topic