Re: error returning with PEAR::DB
| From: | Pupeno | Date: | Tue, 30 Mar 2004 20:37:13 +0000 |
| Subject: | Re: error returning with PEAR::DB | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-11545@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tuesday 30 March 2004 17:15, Nelson E. Castillo wrote:
> You could (but probably should not) parse the DBMS
> user message to tell what happened. I would prefer
> to do the query to find out whether the user
> exists. It will be rather fast if you set an index
> for the 'username' field -if it's not not your
> primary key-.
Parsing the DBMS output would make my implementation DBMS dependant making the
whole PEAR::DB idea irrelevant.
I really don't understand why the DBMS don't throw specific errors that a
database layer could parse to provide structures of what went wrong.
- --
Pupeno: pupeno@pupeno.com
http://www.pupeno.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAadp9tCepaMf3unIRAtrIAJsHmjmPMZ+GZHaQXk+LcUMq7vBBEACeL+Pf
f8tLpV+cNUD5+dh2sXdpHQg=
=Jq7f
-----END PGP SIGNATURE-----