Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
History.php
Go to the documentation of this file.
1 <?php
7 
15 {
21  protected function _construct()
22  {
23  $this->_init('import_history', 'history_id');
24  }
25 
32  public function getLastInsertedId($userId)
33  {
34  $connection = $this->getConnection();
36  ->select()
37  ->from($this->getMainTable())
38  ->order($this->getIdFieldName() . ' DESC')
39  ->where('user_id = ?', $userId)
40  ->limit(1);
41 
42  return $connection->fetchOne($select);
43  }
44 }
$connection
Definition: bulk.php:13