Re: a conditionial insert
| From: | Jason Wong | Date: | Tue, 19 Nov 2002 06:34:27 +0000 |
| Subject: | Re: a conditionial insert | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-125033@lists.php.net to get a copy of this message | ||
On Tuesday 19 November 2002 11:13, Justin French wrote:
> Depends on hwo you want your logic to work, but I think what you have isn't
> terribly accurate, because you're testing $result and mysql_num_rows() at
> the same time --
if (A AND B)
B only gets evaluated only if A is true, so it's quite safe to do this:
> > if ($result && mysql_num_rows($result) < 1)
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Never put off until tomorrow what you can do today. There might be a
law against it by that time.
*/