IF statement works but ELSE doesnt?
<p>I have the following statement and the IF ELSE doesnt seem to be working? By not working I mean its just running the while loop and display the H1 without checking to see if results isnt null?</p>

<p>Can anybody see any obvious errors? </p>

<pre><code>    if($interests_result != 0) {
        print "&lt;h1&gt;Users with the same interests!&lt;/h1&gt;&lt;div style='clear:both;'&gt;";
        while($interests_row = mysql_fetch_array($interests_result, MYSQL_ASSOC))
        {
            $int_user = $interests_row['user_id'];
            $int_twit_user = $interests_row['twitterUser'];

            $divLeft = '&lt;div class="user-box" id="thediv_'.$int_user.'"&gt;&lt;div class="twithandlepic"&gt;&lt;img src="http://api.twitter.com/1/users/profile_image/';
            $divRight = '&lt;div class="twithandle"&gt;';
            $clearDiv = '&lt;div style="clear:both;"&gt;&lt;/div&gt;';

            print $divLeft.strip_tags($int_twit_user)."?size=normal\" style=\"width:48px; height:48px;\"/&gt;&lt;br \/&gt;".$int_twit_user.$divRight."&lt;a href='javascript:void(0);'   id='".$interests_row['user_id']."' class='getIntPoint'&gt;Get ".$interests_row['coff']." &lt;input type='hidden' value='".$interests_row['coff']."' class='credoff' name='credoff'/&gt; credit(s)&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;$clearDiv&lt;/div&gt;&lt;/div&gt;"; 
        }
        print $clearDiv."&lt;/div&gt;"; 
    }
    else
    {
        print "No users to display!";
    }
</code></pre>

<hr>

<p>The value assigned to interests_result is...</p>

<pre><code>$interests_query = "SELECT * FROM produgg_users
join user_interests on produgg_users.id = user_interests.user_id
where (interest = '$interest1' OR interest = '$interest2' OR interest = '$interest3') and produgg_users.id != '".$usersClass-&gt;userID()."' and credits &gt;= coff and produgg_users.id NOT IN (select concat_ws(',', followedID) from produgg_activity where followerID = '".$usersClass-&gt;userID()."') ORDER BY coff DESC LIMIT 30;";

$interests_result = mysql_query($interests_query) or die(mysql_error());
</code></pre>
