Re: Bizarre SQl, if issue....
| From: | Curt Zirzow | Date: | Tue, 29 Jul 2003 19:26:37 +0000 |
| Subject: | Re: Bizarre SQl, if issue.... | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-157405@lists.php.net to get a copy of this message | ||
* Thus wrote Mike At Spy (spycobalt@spyproductions.com):
Hey mike,
>
> > > $vthere = mysql_num_rows($which_person);
> > > if ($vthere == '0') { True } else { False }
>
> 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. :\
Have you tried just testing the value of $vthere:
if (!$vthere) { we dont have data } else { we have data }
I've been using this method since really early versions of php and
havn't had any problems with this method. Unless there was some
excplicite bug with version 4.1.2, I may have skipped that version
upgrade.
>
> 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.
Really they should at least stay current. I would insist they
upgrade or remove php from their plan (argghh.)
Curt
--
"I used to think I was indecisive, but now I'm not so sure."