注释完善

This commit is contained in:
thinkphp
2016-04-10 10:37:06 +08:00
parent 6c406e208e
commit 8b747500b3
2 changed files with 61 additions and 19 deletions

View File

@@ -1814,7 +1814,7 @@ abstract class Driver
public function update(array $data)
{
$options = $this->_parseOptions();
if (!isset($options['where'])) {
if (empty($options['where'])) {
$pk = $this->getTableInfo($options['table'], 'pk');
// 如果存在主键数据 则自动作为更新条件
if (is_string($pk) && isset($data[$pk])) {