> This is a reply to an e-mail that you wrote on Tue, 29 Jul 2003 at > 19:46, lines prefixed by '>' were originally written by you. > > I did! Look at this again: > > $which_person = mysql_query("SELECT ID FROM tblItems WHERE > number = > > $place"); > > $vthere = mysql_num_rows($which_person); > > if ($vthere == '0') { True } else { False } > > Yet it still returns as if this is FALSE (i.e. it executes the > else > > {}. : > > As long as your query is returning 0 rows that code should work ok, > but it is incorrect for correctness, > if ($vthere == '0') > should be > if ($vthere == 0) > As $vthere will contain an integer, not a string, but as you are > using the == comparison operator instead of === PHP should > convert them both to the same type before comparing. > > Can we see the snippet of the actual code that you are using?
Actually, what you see is *exactly* the code being used. Nothing has changed about it. And whether the variable is regarded as a string or a number, it gives me the same stupid issue. Not recognizing it as a True statement. :\ Is there any way possible that this could be the client's server? I had to beg to get 'em to recompile to 4.1.2 from 4.0.3. There are using a version of Linux I don't recognize (it isn't redhat or mandrake), but it looks like their kernel is up to date. On my redhat server (with php 4.3.3), the same code responds properly (i.e. that $vthere ==0 is true). :\ -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php