Re: prepare/execute in PEAR::DB
| From: | Vinai Kopp | Date: | Thu, 15 Nov 2001 21:12:53 +0000 |
| Subject: | Re: prepare/execute in PEAR::DB | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-2906@lists.php.net to get a copy of this message | ||
Two other benefits come to my mind:
4. PEAR::DB does the escaping stuff for you automatically.
5. Queries with varying values that are repeated often outside of loops only have to be typed once, thus reducing the probability of typos :)
I think the best part of it is point no. 2
Greetings,
Vinai
--On Donnerstag, 15. November 2001 19:37 +0100 Christian Stocker <chregu@bitflux.ch> wrote:
Hi out there can anyone explain me, what's the idea of prepare/execute in PEAR::DB? I came to some conclusions, but i'm not sure, if they are correct: 1. some RDBMS can preparse a prepare statement and don't have to that afterwards for each query. 2. the code looks nicer. I don't have to mix my SQL with variables and escaping-stuff. 3. perl-dbi does it that way, too :) are they wrong? are there more? please don't let me die stupid ;) chregu -- PEAR Development Mailing List (http://pear.php.net/) To unsubscribe, e-mail: pear-dev-unsubscribe@lists.php.net For additional commands, e-mail: pear-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net