Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-24-2008, 02:22 PM
Junior Member
 
Join Date: Apr 2008
Posts: 3
Default get last insert id in oracle

Hi

I need last id insert into my table. But the return of insert, and lastInsertId is empty. The insert create a fields in my table, but don't return id.

The code of my model is the next

public static function add ($request)
{
$customers = new Customers();
$data['customer_name'] = $request['firstName'] . ' ' . $request['lastName'];
$data['customer_type'] = $request['customer_type'];
$data['creation_date'] = new Zend_Db_Expr('sysdate');
return $customers->getAdapter()->lastInsertId();
}

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-24-2008, 06:09 PM
Junior Member
 
Join Date: Apr 2008
Posts: 3
Default

I solved!!

I need send de Sequencence name with param of lastInsertId('cm_customer_id')
__________________
blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:16 PM.