WordPress.org

Forums

[resolved] How to query user role directly in wp_users table? (2 posts)

  1. WebTechGlobal
    Member
    Posted 1 year ago #

    I want to query users who registered longer than 30 days ago and exclude anyone who is not a subscriber. So the query will always return subscribers.

    How can this be achieved considering the wp_capabilities column in the wp_users table is a serialized array?

    I did try WHERE wp_capabilities LIKE "%subscriber%" however they stated it does not work.

    Thanks folks have a nice day.

  2. WebTechGlobal
    Member
    Posted 1 year ago #

    Oops...

    "%%subscriber%%"

    Slipped my mind and it works.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.