Yii Framework Forum: How to get last inserted record ID in YII2 - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How to get last inserted record ID in YII2 Rate Topic: -----

#1 User is offline   SrikanthMaggidi 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 19-May 14
  • Location:Hyderabad,India

Posted 17 May 2017 - 05:34 AM

Yii2: By using following statement you can get last inserted record ID.
Yii::$app->db->getLastInsertID()

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users