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.