Table - wp_usermeta
user_id meta_key meta_value
10 login_status 0
10 active_code 3f7431e226893f16cbe44424850d00ad
I need to select user_id
where login_status = 0
and active_code = 3f7431e226893f16cbe44424850d00ad
Ex: SELECT user_id FROM usermeta WHERE active_code ='3f7431e226893f16cbe44424850d00ad' and login_status='0'
Tried below query but no success.
$querystr = "
SELECT $wpdb->usermeta.user_id, $wpdb->usermeta.meta_key
FROM $wpdb->usermeta
WHERE $wpdb->usermeta.meta_value = '3f7431e226893f16cbe44424850d00ad`
AND $wpdb->usermeta.meta_value = '0' ";
How can I simply fetch the login_status
value along with active_code
.
Thanks