Advanced WordPress SQL Query

In WP, you rarely need to “write SQL queries”, unless you work with custom tables, instead use its API…

WP_User_Query will join for you all meta data attached to each user and return to you plain user objects, so why not use it instead?

Also, see get_user_meta()

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)