Re: [php] if $sql has returned something
| From: | Jason Wong | Date: | Wed, 25 Feb 2004 18:01:34 +0000 |
| Subject: | Re: [php] if $sql has returned something | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-178866@lists.php.net to get a copy of this message | ||
On Thursday 26 February 2004 01:53, John Taylor-Johnston wrote:
> Here is my code. $sql works correctly, but am not sure I did this line
> correct:
Your query ($sql) is incorrect and will not work. See manual for why.
> $glquery = mysql_query($sql);
>
> because "if ($glquery)" always returns something. I want to know if it
> returns NULL.
It will never return NULL. See manual for why.
Your logic of using "if ($glquery)" for your purpose is incorrect. See manual
for why.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
The more beautiful the woman is who loves you, the easier it is to leave her
with no hard feeling
-- Murphy's Laws on Sex n1
*/