开发者

Getting lastInsertId from model extended by Zend_Db_Table_Abstract

Tried to get it that way inside extended model:

$th开发者_运维问答is->lastInsertId();

and getting this error:

Fatal error: Call to undefined method InsertAd::lastInsertId()

Data is added successfully to the database, but i can't get auto_incremented key.


lastInsertId is a method of the adapter.

$id = $this->getAdapter()->lastInsertId($stuff);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜