[thelist] Re: DBI was PEAR was: PHP vrs Perl - 15 rounds
sbeam
sbeam at syxyz.net
Mon Mar 8 12:36:44 CST 2004
On Monday 08 March 2004 11:52, Raditha Dissanayake wrote:
> Hi,
>
> As I mentioned I am not an expert on PEAR please do correct me if i
> am wrong i will accept it gracefully.
>
> PEAR is entirely in PHP, in other words php is another layer above
> the PHP engine but the idea of parameter binding is that it allows
> you to make use precompiled (SQL statements where available). In pear
> what happens i a simulation of this effect.
Hi - I think it is two separate issues. PEAR is entirely PHP and some of
perl DBI is C (but with large parts perl) and is thus precompiled so to
speak. But nobody ever said using DB abstraction will make your code
run faster, just your app development and maintenance time (as you
know).
As far as compiling the SQL statement itself the prepare() method in
both cases passes the string to the underlying DB for the compliation
and returns the statement handle. I just checked the source for the
Oracle subclass for instance and it calls PHP's ociparse() and returns
the stmt handle as expected, so its not an emulation. And in cases like
mySQL where pre-compiled statements are not supported, the effect must
be emulated either way so it makes no difference it seems.
Not making any claims to expert either, just a satisfied customer.
--
# S Beam - Web App Dev Servs
# http://www.onsetcorps.net/
More information about the thelist
mailing list