mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-10 08:32:48 +08:00
改进Query类的insertGetId方法 支持传入自增序列名
This commit is contained in:
@@ -1333,11 +1333,12 @@ class Query
|
||||
* @access public
|
||||
* @param mixed $data 数据
|
||||
* @param boolean $replace 是否replace
|
||||
* @param string $sequence 自增序列名
|
||||
* @return integer
|
||||
*/
|
||||
public function insertGetId(array $data, $replace = false)
|
||||
public function insertGetId(array $data, $replace = false, $sequence = null)
|
||||
{
|
||||
return $this->insert($data, $replace, true);
|
||||
return $this->insert($data, $replace, true, $sequence);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user