I have been doing like this:

if (!$stmt->execute()) {
        return false;
} else {

... some code

        return true;
        return $foo; // Some int, string, whatever.


I am thinking about changing the "return false" with a:

if (!$stmt->execute()) {

This way making sure that every single db execute gets a valid check
and at the same time return some kind of valuable db error to the user
and end the script.

How do you deal with db execution checks?

Thanks in advance!

Best regards.


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to