Skip to content
This repository was archived by the owner on Jan 4, 2020. It is now read-only.

Commit 4f332b2

Browse files
committed
改进参数的自动绑定
1 parent b1638ec commit 4f332b2

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

ThinkPHP/Library/Think/Db/Driver.class.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,8 @@ protected function parseSet($data)
417417
$set[] = $this->parseKey($key) . '=' . $val;
418418
} else {
419419
$name = count($this->bind);
420-
$set[] = $this->parseKey($key) . '=:' . 'bind_' . $name;
421-
$this->bindParam('bind_' . $name, $val);
420+
$set[] = $this->parseKey($key) . '=:' . NOW_TIME.'_' . $name;
421+
$this->bindParam(NOW_TIME.'_' . $name, $val);
422422
}
423423
}
424424
}
@@ -911,8 +911,8 @@ public function insert($data, $options = array(), $replace = false)
911911
$values[] = $val;
912912
} else {
913913
$name = count($this->bind);
914-
$values[] = ':' . 'bind_' . $name;
915-
$this->bindParam('bind_' . $name, $val);
914+
$values[] = ':' . NOW_TIME.'_' . $name;
915+
$this->bindParam(NOW_TIME.'_' . $name, $val);
916916
}
917917
}
918918
}
@@ -953,8 +953,8 @@ public function insertAll($dataSet, $options = array(), $replace = false)
953953
$value[] = $val;
954954
} else {
955955
$name = count($this->bind);
956-
$value[] = ':' . 'bind_' . $name;
957-
$this->bindParam('bind_' . $name, $val);
956+
$value[] = ':' . NOW_TIME.'_' . $name;
957+
$this->bindParam(NOW_TIME.'_' . $name, $val);
958958
}
959959
}
960960
}

0 commit comments

Comments
 (0)