Re: Alternative MySQL PEAR DB sequence behavior
| From: | Jim Winstead | Date: | Tue, 24 Jul 2001 22:17:16 +0000 |
| Subject: | Re: Alternative MySQL PEAR DB sequence behavior | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-1033@lists.php.net to get a copy of this message | ||
On Wed, Jul 25, 2001 at 01:05:42AM +0200, Stig S. Bakken wrote:
> jimw@php.net wrote:
> > and while i'm dipping into the thread, am i the only one who wishes
> > that PEAR::DB had an (additional?) interface that mapped more directly
> > to how mysql can handle sequences, and perhaps something that would
> > provide a generic interface for the functionality you get with mysql's
> > LIMIT?
>
> If you're doing database specific stuff anyway, why not use
> $dbh->connection (we can add a method for retrieving it, for future
> compatibility) and mysql_insert_id()?
i wasn't talking about doing database-specific stuff (but do use
$result->result in one application :). i was just suggesting we might
want to provide an interface for sequences that looks more like how
mysql handles them, which could then be emulated on other databases.
the model that was chosen (nextId, createSequence, etc) is obviously
more tailored to other databases, and doing it that way with mysql
just screams 'hack' to me.
it isn't a big deal, obviously, and i'm sure there would be lots of
people opposed to supporting both models.
> As for LIMIT, I think we should add that. It can be emulated in
> "compatible mode" for others, too.
right, that was my intention.
jim