omusico / zfdatagrid

Automatically exported from code.google.com/p/zfdatagrid
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Crud after_insert insertId return 1 #836

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.i try to get id of the last inserted data

What is the expected output? What do you see instead?

the 3 param of after_insert event return always 1

Please insert the appropriate values;
                    Zend Framework version:1.11
ZFDatgrid Version (Bvb_Grid::getVersion()):0.8
                          Operating system:xp
                               PHP Version:5.3
               Database Server and version:mysql5.2
                          Source Adatapter:doctrine 1.2

Please provide any additional information below.

Original issue reported on code.google.com by madani...@gmail.com on 13 Mar 2012 at 10:56

GoogleCodeExporter commented 9 years ago
Hi,

With me all is working well. How are you doing that?

Example:

$grid->listenEvent('crud.after_insert', array($this, 'afterInsert'));

function afterInsert(Bvb_Grid_Event $event)
{
   $params = $event->getParams();

   $insertId = $params['insertId'];
}

Regards
Ivo Monteiro

Original comment by ivomonte...@gmail.com on 13 Mar 2012 at 12:08

GoogleCodeExporter commented 9 years ago

Original comment by ivomonte...@gmail.com on 1 Apr 2012 at 1:36