title: Help encoding JSON with User Info (MySQL)
body: <p>I am currently getting the accountID's from my followers database and outputting them into JSON. But instead of just getting the accountID's from the db, how could I get the user information from another table "Accounts" and append that to the JSON?</p>
  
  <p>My current code to do so is:</p>
  
  <pre><code>    $accountID = NULL;
      if (isset($_GET['accountID'])) {
          $accountID = mysql_real_escape_string($_GET['accountID']);
      }
      else {
          exit("No accountID set");
      }
      $query = mysql_query("SELECT * FROM Following WHERE `followingUserID` = '$accountID`");
      $rows = array();
      while($r = mysql_fetch_assoc($query)) {
           $rows[] = $r;
      }
      header('Content-type: application/json');
      exit(json_encode($rows));
  </code></pre>