Re: PEAR::DB == || != DBA
| From: | Lukas Smith | Date: | Fri, 02 Apr 2004 15:59:43 +0000 |
| Subject: | Re: PEAR::DB == || != DBA | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-11587@lists.php.net to get a copy of this message | ||
Eric Stewart wrote:
After taking a hard look at database abstraction and choosing PEAR::DB as my abstraction layer tool. It occurred to me that this does not quite fit the bill. The main problem being escaping strings before insertion and selection. Because many databases, example MySQL, Oracle & Sybase, do not escape characters in the same manner, and because the string escape is not implemented (at least I couldn't find it) in the PEAR::DB module, then you are left to escape the string in a manner appropriate to each database outside the PEAR::DB module. Adding to this the fact that here is no PHP function that correctly escapes all characters for all databases, then complete DBA is not a possibility by strictly using PEAR::DB. You must encapsulate PEAR::DB with your own DBA to achieve the desired result. Is this a fair and accurate assumption? Or am I missing something?http://pear.php.net/manual/en/package.database.db.db-common.quotesmart.php http://pear.php.net/manual/en/package.database.db.db-common.quoteidentifier.php however DB lacks several other features to fully abstract which MDB/MDB2 provides (like LOB and date handling). regards, Lukas Smith smith@backendmedia.com _______________________________ BackendMedia www.backendmedia.com berlin@backendmedia.com Linn Zwoch Smith GbR Pariser Str. 44 D-10707 Berlin Tel +49 30 83 22 50 00 Fax +49 30 83 22 50 07