title: MySQL getting followers from a certain user in c#
body: <p>My database currently exists of 2 tables. One is a user table, and the other is a followers table. Users can follow each other, which means the followers table will have a row that looks like this:</p>
  
  <pre><code>Table: followers
  Row: user_id | follower_id
  </code></pre>
  
  <p>So if I have 3 users:</p>
  
  <pre><code>User 1 | id = 1
  User 2 | id = 2
  User 3 | id = 3
  </code></pre>
  
  <p>And user 1 follows user 2 and user 2 follows user 3, the rows in the followers table will look like this:</p>
  
  <pre><code>user_id = 2 | follower_id = 1
  user_id = 3 | follower_id = 2
  </code></pre>
  
  <p>All of this works fine, but how should I create a query when I want to retrieve all followers from this user in c#? My class has a list of ids of people who follow this user. Like this: (This could be a list of user objects, I just need the ids for now)</p>
  
  <pre><code>public class User
  {
      public int id { get; set; }
      public List&lt;int&gt; followers { get; set; }
  }
  </code></pre>
  
  <p>I can retrieve the user from the database, I just can't figure out how to get the followers of this user all in one query. Any help would be appreciated!</p>