title: Check if a row with given values exists
body: <p>I have a query for users to create a follower / following relationship within my application:</p>
  
  <pre><code>INSERT INTO following(IdUser,followingID) VALUES('%d','%d')", $id, $followingId
  </code></pre>
  
  <p>What would be the query to check if a relationship between two users already exists?</p>
  
  <p>Or, how do I check if a relationship between two users doesn't exist?</p>
  
  <p>Typically, I return the results in an iOS application like so: </p>
  
  <pre><code>    if (!$result['error']) {
      // if no error occured, print out the JSON data of the 
      // fetched photo data
      print json_encode($result);
  } else {
      //there was an error, print out to the iPhone app
      errorJson('Follow is broken');
  }
  </code></pre>
  
  <p>Any help would be appreciated.</p>