Re: [php] if $sql has returned something
| From: | John Taylor-Johnston | Date: | Wed, 25 Feb 2004 19:32:20 +0000 |
| Subject: | Re: [php] if $sql has returned something | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-178879@lists.php.net to get a copy of this message | ||
Very helpful & much appreciated.
Richard Davey wrote:
> Hello John,
>
> Wednesday, February 25, 2004, 6:26:41 PM, you wrote:
>
> JTJ> Richard,
> JTJ> Thanks. Should I still include the die ?
>
> JTJ> $glquery = mysql_query($sql) or die("Invalid query: " . mysql_error());
>
> It's up to you, I never do. It won't give you a very clean exit if an
> error occurs.