title: Getting a list of users from a mysql table
body: <p>I have a MySQL table that consists of the following data:</p>
  
  <pre><code>User  | Status 
  ------|-------
  Bob   | online  
  Mike  | online  
  Karen | offline  
  Joe   | online
  </code></pre>
  
  <p>Is there a way to form a query like the one below, so that I get back a list of all users who are online?</p>
  
  <pre><code>$query=  "SELECT User FROM User_table WHERE Status='online'";
  $db-&gt;setQuery($query);
  $userlist=$db-&gt;loadresult();
  </code></pre>