if statement OOP
<p>I have the following code</p>

<pre><code>/* Errors exist, have user correct them */
  if($form-&gt;num_errors &gt; 0)
  {
     return 1;  //Errors with form
  }
  /* No errors, add the new account to the */
    else if($database-&gt;addLeagueInformation($subname, $subformat, $subgame, $subseason, $subwindow, $subadmin, $subchampion, $subtype))
    {
        return 0;  //New user added succesfully
    }
    else
    {
    return 2;  //Registration attempt failed
    }
</code></pre>

<p>I want to add the following to it </p>

<pre><code>$databases-&gt;addLeagueTable($name)
</code></pre>

<p>This should happen at the same time as addLeagueInformation.
Any ideas?</p>

<p>Edited, will this work?</p>

<pre><code>else if($database-&gt;addLeagueInformation($subname, $subformat, $subgame, $subseason, $subwindow, $subadmin, $subchampion, $subtype)
                                            &amp;&amp; $databases-&gt;addLeagueTable($name) &amp;&amp; $_SESSION['players'] == $subplayers &amp;&amp; $comp_name =     
                                            "$format_$game_$name_$season" &amp;&amp; $_SESSION['comp_name'] = $comp_name)
</code></pre>
