title: SQLIte Query, select everything that equals - Android
body: <pre><code>// get friends
  public Cursor getFriends(){
      Cursor c = dataBase.query(SqConstants.FRIENDS_TABLE_LOCAL, null, null, null, null, null, null);
      return c;
  }
  </code></pre>
  
  <p>I have multiple tables in a SQLite database in my application for android.</p>
  
  <p>I want to select everything from a column in a Friends Table (which holds integers) and select everything that equals that integer from a User Table (in the primary column which also is integer) and the get all the users which equals the numbers stored in the friends column.</p>
  
  <p>It was some while I managed SQL databases but I think the query for a MySQL database would be something like:</p>
  
  <pre><code>SELECT * UsersID FROM TABLE Users EQUALS LOCAL_FRIENDS_ID FROM TABLE Friends
  </code></pre>
  
  <p>I might be wrong that it would look like this, but something like it.</p>
  
  <p>What I want is to do this in android code, from a cursor get all the Users from the Users table which ID is equal to the FriendsID.</p>
  
  <p>How do I change the above method to make it so?</p>