WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Help with sql syntax (3 posts)

  1. csseur3
    Member
    Posted 5 years ago #

    Hello, with this part of a query:

    WHERE meta_value = 'test'

    i would like to extend at all fields where the single word "test" is here, in a text or alone.

    so, i would like it's work when it's "test" or "blablabla test blabla" in the field.

    i don't know what is the syntax for doing this, help me please :)

    bye

  2. esmi
    Forum Moderator
    Posted 5 years ago #

    Try:

    WHERE meta_value LIKE 'test'

  3. RockyMtnHi
    Member
    Posted 5 years ago #

    You may need to add wildcard characters:
    WHERE meta_value LIKE '%test%'

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags