PEAR DB - some suggested improvements
| From: | John Lim | Date: | Sat, 27 Oct 2001 07:30:20 +0000 |
| Subject: | PEAR DB - some suggested improvements | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-2401@lists.php.net to get a copy of this message | ||
Hello,
While reviewing PEAR DB for a book I'm writing,
I found a few issues that can be improved in PEAR DB.
1. PEAR DB's error handling does not capture the error
message, only the error number. I would suggest including
the error message, because it often contains info specific
to the error, such as in what column the SQL syntax error
occurred.
2. The oci8 driver attempts to return the numRows() by
changing the select statement to a select count(*). This
will only work in a single-user or read-only environment.
Better to accept defeat and just return -1.
3. The isManip() function will not work properly with some
databases that allow stored procedures to return recordsets.
I would suggest deprecating it.
Regards, John