WordPress.org

Ready to get started?Download WordPress

Forums

Search wp_usermeta table (1 post)

  1. mrdthomas
    Member
    Posted 4 years ago #

    Hello,

    I am trying to create a search-able directory that displays all users of my blog but also can be searched by first name and last name in the wp_usermeta table. I can get it to search by one or the other but not by both. Anyone able to achieve this?

    SELECT user_id, meta_value FROM wp_usermeta WHERE meta_key = 'first_name' AND meta_value LIKE 'A%' ORDER BY user_id

    If I am not clear please let me know.

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.