改进参数绑定类型 支持bit类型自动绑定

This commit is contained in:
thinkphp
2016-12-27 10:23:22 +08:00
parent c20c27bcb8
commit 7a26126a9b

View File

@@ -1556,7 +1556,7 @@ class Query
*/
protected function getFieldBindType($type)
{
if (preg_match('/(int|double|float|decimal|real|numeric|serial)/is', $type)) {
if (preg_match('/(int|double|float|decimal|real|numeric|serial|bit)/is', $type)) {
$bind = PDO::PARAM_INT;
} elseif (preg_match('/bool/is', $type)) {
$bind = PDO::PARAM_BOOL;