Chris wrote:
You'll need to:
$dbtoy = new DBToyExt();
$dbtoy->connect()
$dbtoy->testext('testing');
But you cannot do:
$dbtoy = new DBToyExt();
$dbtoy->connect()
$dbtoy->testext('testing');
$result = $dbtoy->query('SELECT...');
//[...]
You have to do something like this:
$dbtoy =
[EMAIL PROTECTED] wrote:
Ahhh! I'd kept thinking what connect() returned was a db object, but it does
look like
it returns varying objects depending on which database you're using.
correct
Maybe I'd want to extend DB_common instead of DB_mysql, so that the methods
would
be inhereted by an
> > So... I'm trying to extend PEAR::DB. It'd be great to keep everything it
> > offers and just add a few more perhaps unconventional functions.
> >
> > $dte = DBToyExt::connect("mysql://weston_tssa:[EMAIL
> > PROTECTED]/weston_tssa");
> >
>
> DB::connect() is actually a factory call. So
[EMAIL PROTECTED] wrote:
Weston wrote:
$dte = DBToyExt::connect("mysql://weston_tssa:[EMAIL PROTECTED]/weston_tssa");
$dte->testext('testing');
$dte->testext($dte->moo);
$dte->testext($dte->bar);
>>>
$dte will only have the return value of DBToyExt::connect() - it won't
allow you to access
Weston wrote:
> > $dte = DBToyExt::connect("mysql://weston_tssa:[EMAIL
> > PROTECTED]/weston_tssa");
> >
> > $dte->testext('testing');
> > $dte->testext($dte->moo);
> > $dte->testext($dte->bar);
On Fri, Mar 10, 2006 at 10:43:02AM +1100, Chris wrote:
> $dte will only have the return value of
[EMAIL PROTECTED] wrote:
So... I'm trying to extend PEAR::DB. It'd be great to keep everything it offers and just add a few more perhaps unconventional functions.
Intuitively, it seemed like this approach might work:
testext('testing');
$dte->testext($dte->moo);
$dte->testext($dte->bar
So... I'm trying to extend PEAR::DB. It'd be great to keep everything it offers
and just add a few more perhaps unconventional functions.
Intuitively, it seemed like this approach might work:
testext('testing');
$dte->testext($dte->moo);
$dte->testext($dte->bar);
?>
However, it does
7 matches
Mail list logo