That's what I was afraid up. Looking in the code, I didn't see any functionality pointing to that.
As for using lastSequenceId(), bad mojo. Using Zend_Db's default auto-commit settings, it's extremely easy to get sequence ids crossed during heavy loads, and thus causing all sorts of problems. nextSequenceId() is the prefered method; however, that still causes issues due to the autocreates of our sequences. I'll just write out the statement then. Old schoolin' it. --- Philip [EMAIL PROTECTED] http://www.gpcentre.net/ On Wed, Aug 6, 2008 at 11:30 AM, Bill Karwin <[EMAIL PROTECTED]> wrote: > > > > Philip G wrote: > > > > I don't suppose there's anyway to use the RETURNING clause within > > Zend_Db's > > architecture without writing out the full statement myself and using > > parameter bindings? > > > > You're on your own here. Zend_Db has no special support for RETURNING. If > you can do it by writing your own query and binding return parameters, > great. You may also have to write your own custom version of > Zend_Db_Table::insert() to support this method of returning the id. > > > Philip G wrote: > > > > I'd expect Zend_Db_Adapter_Abstract::insert() would support something of > > this nature for Oracle databases. It's probably the only way to easily > get > > back a primary key on tables that are setup to "mimic" auto_increment. On > > top of that, I'm having one hell of a time battling with our DBAs to gain > > access to even view the sequence to pop it. > > > > Sorry, you're going to have to persuade the DBA to give you that access. > Zend_Db has the lastSequenceId() function, which in turn queries "SELECT > sequencename.CURRVAL FROM dual" (given a sequence called "sequencename"). > But of course this requires that you have the privilege to call the > function > on the sequence. > > Regards, > Bill Karwin > -- > View this message in context: > http://www.nabble.com/Zend_Db-PDO-OCI-Oracle-%2B-RETURNING-clause-tp18852478p18854992.html > Sent from the Zend Framework mailing list archive at Nabble.com. > >
