Here is snippet for getting the ID of row after you have executed inserting the data into Magento table
01
02
03
04
05
06
07
08
09
10
11
12
13
| function getLastInsertId( $tableName , $primaryKey ) { //SELECT MAX(id) FROM table $db = Mage::getModel( 'core/resource' )->getConnection( 'core_read' ); $result = $db ->raw_fetchRow( "SELECT MAX(`{$primaryKey}`) as LastID FROM `{$tableName}`" ); return $result [ 'LastID' ]; } //Usage: $setup = new Mage_Eav_Model_Entity_Setup( 'core_setup' ); $optionTable = $setup ->getTable( 'eav/attribute_option' ); $lastInsertId = getLastInsertId( $optionTable , 'option_id' ); |
The danger issue is additional during this kind of product which is why it's greatly advisable to travel for insurance.wp themes
ReplyDeletesupreme clothing
ReplyDeletekobe basketball shoes
off white hoodie
hermes outlet online
off-white
bape
supreme clothing
golden goose outlet
off white hoodie
golden goose