On Tue, Oct 26, 2010 at 06:27:33AM +0200, Rico Secada wrote:
> On Mon, 25 Oct 2010 22:56:37 -0400
> Paul M Foster wrote:
>
> > Bear in mind, an "error" is *never* that a query returned no data or
> > data the user might consider bad.
>
> This is an important point. When is an "error" an actual
On Mon, 25 Oct 2010 22:56:37 -0400
Paul M Foster wrote:
> Bear in mind, an "error" is *never* that a query returned no data or
> data the user might consider bad.
This is an important point. When is an "error" an actual error? When is
it something that *needs* to be logged and mailed?
> Paul
>
On Mon, Oct 25, 2010 at 06:06:24AM +0200, Rico Secada wrote:
> Hi.
>
> I have been doing like this:
>
> if (!$stmt->execute()) {
> return false;
> } else {
>
> ... some code
>
> return true;
> OR
> return $foo; // Some int, string, whatever.
>
> }
>
> I am thinking about ch
On Mon, 25 Oct 2010 00:26:23 -0700
"Tommy Pham" wrote:
> > -Original Message-
> > From: Rico Secada [mailto:coolz...@it.dk]
> > Sent: Sunday, October 24, 2010 9:06 PM
> > To: php-general@lists.php.net
> > Subject: [PHP] Best practice for if (!$
> -Original Message-
> From: Rico Secada [mailto:coolz...@it.dk]
> Sent: Sunday, October 24, 2010 9:06 PM
> To: php-general@lists.php.net
> Subject: [PHP] Best practice for if (!$stmt->execute())
>
> Hi.
>
> I have been doing like this:
>
> if (!$stm
Hi.
I have been doing like this:
if (!$stmt->execute()) {
return false;
} else {
... some code
return true;
OR
return $foo; // Some int, string, whatever.
}
I am thinking about changing the "return false" with a:
if (!$stmt->execute()) {
die(DB_ERROR);
This w
6 matches
Mail list logo