Re: cvs: pear /DB/DB common.php

From: Date: Sun, 09 Jun 2002 19:08:23 +0000
Subject: Re: cvs: pear /DB/DB common.php
References: 1 2  Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-4518@lists.php.net to get a copy of this message
(Fabien) >> Modified files: >> /pear/DB/DB common.php >> Log: >> Add of autoPrepare() (Tomas) > Umm, I'm asking my self why not directly execute the query too? > return $this->query($sql, array_values($array)); > would do the trick. btw the method could become something like > autoExecute or buildExecute. I have thought about that. I write autoPrepare() because of flexibility. If you want to use executeMultiple() for example with another array ! But I agree with you. In most cases, you have to write two lines ! With autoExecute(), one line is enough ! So, I propose to keep autoPrepare() (for flexibility reasons) and to add autoExecute(). To avoid copy/paste of the code, I could make a private method to build the sql query used by autoPrepare() and autoExecute(). I let you take the final decision :-)) For me, there are three choices : - autoPrepare() only (now) - autoPrepare() and autoExecute() (with a little private query builder) - autoExecute() only Thanks, Fabien :-)

« previous php.pear.cvs (#4518) next »