0
How do I get the field values meta_value = candidate of this table.
I’m using this query, but it’s returning an empty array.
$resultados2 = $wpdb->get_results( "SELECT * FROM $wpdb->usermeta WHERE $wpdb->usermeta.meta_key = 'wp_capabilities' AND $wpdb->usermeta.meta_value = 'candidate';");
print_r($resultados2);
I want to reclaim the fields candidate.

Rounding out the answer... The array is being returned empty because you are looking for 'candidate' (exactly) and actually the record comes as "a:1:{s:9:"candidate";b:1;}". LIKE will perform a rough search and return records that contain "candidate".
– Jeferson Leonardo
@Jefersonleonardo I took the liberty of increasing the response with your suggestion, okay?
– Thiago Santos
Okay, @Thiago Santos
– Jeferson Leonardo