title: Get user id from wp_usermeta table
body: <p>I have stored the certain term ids in wp_usermeta table.
  i want to get the user id where the term id match with the user meta key 'location' value.
  i have tried it with below query but it is doing nothing.</p>
  
  <pre><code>global $wpdb;
      $term = get_queried_object();
      $query = $wpdb-&gt;get_results("SELECT user_id FROM wp_usermeta WHERE meta_key='location' AND meta_value LIKE %s",'%'.$term-&gt;term_id.'%');
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/3cKJh.jpg" alt="enter image description here"></p>