Re: general questions
| From: | John Lim | Date: | Thu, 29 Nov 2001 17:59:30 +0000 |
| Subject: | Re: general questions | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-3192@lists.php.net to get a copy of this message | ||
Hi
ADOdb already has a beta version that supports the PEAR DB API.
Simply do the following in ADOdb 1.54.
<?
include_once "adodb-pear.inc.php";
$db = DB::connect( "mysql://$dbuser:$dbpass@$dbhost/$dbname" );
$sql = 'SELECT * FROM demo';
$demoResult = $db->query($sql);
while ($demoRow = $demoResult->fetchRow()) {
echo $demoRow[2] . '<br>';
}
?>
You can get it at http://php.weblogs.com/adodb Speedwise,
it is currently
faster than using the native PEAR DB according to my benchmarks.
Beta testers are encouraged to apply!
Bye, John
Jason Lotito <jason@lehighweb.com> wrote in message
news:005101c1785b$995beca0$74003bd0@genric...
> > On Wed, 28 Nov 2001, Martin Jansen wrote:
> >
> > > On Wed, 28 Nov 2001 19:26:26 +0100, Lukas Smith wrote:
> > >
> > > >The package obviously has to be named something ... the current DB
> > > >package is called "DB" .. what would this "other" package
> > be called?
> > >
> > > DB_Metabase.
> > >
> > > BTW: I still don't see a good reason why we should have _two
> > > different_ abstraction layers in PEAR.
> > >
> >
> > Exactly. I feel it will become very strange to use two
> > different packages for database abstraction. IMHO either port
> > the features of Metabase to a PEAR-like interface (_please_
> > keep the current get*() and fetch*()
> > methods) or forget about it.
> >
> > I mean, the best way on this case is having an experimental
> > tree of a 'new' DB package with the Metabase stuff, and work
> > on that tree preserving the current features of PEAR::DB that
> > people love and adding the special stuff of Metabase. Naming
> > it another thing would be kind of weird.
> >
> > Or did I miss something ?
> >
> > Joao
>
> I would have to agree with Joao here. PEAR doesn't need another
> Abstraction layer. Also, maintaining the standards of PEAR is
> important. I like jpm's idea of having the Pear Like interface would
> make the transition easier for PEAR users.
>
> +1
>
> Jason Lotito
> jason@lehighweb.com
> www.NewbieNetwork.net
>