title: How do I make my own true / false return function?
body: <p>I want to make my own function which performs in a similar manner to the following actual code.. ie</p>
  
  <pre><code>if(mysql_num_rows($res) == FALSE) {
  
    // DO SOMETHING BECAUSE THERE ARE NO RESULTS
  
  }
  </code></pre>
  
  <p>In my code, i'm repeating an SQL statement a few times around the place, and if there are results, then I go ahead and do stuff.</p>
  
  <p>What I'd like to do is create my own FALSE return in my own function ie</p>
  
  <pre><code>if(my_special_function($variable) == FALSE) {
  
      // DO STUFF
  
  }
  </code></pre>
  
  <p>Is this as simple as in my special function having something like...</p>
  
  <pre><code>function my_special_function($variable) {
  
     $sql = 'SELECT field FROM table WHERE something=$variable';
     $res = mysql_query($sql);
  
     if(mysql_num_rows($res) == FALSE) {
  
       return FALSE;
  
     } else {
  
       return TRUE;
  
     }
  }
  </code></pre>
  
  <p>?</p>