mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
改进参数绑定类型对枚举类型的支持
This commit is contained in:
@@ -1818,7 +1818,9 @@ class Query
|
|||||||
*/
|
*/
|
||||||
protected function getFieldBindType($type)
|
protected function getFieldBindType($type)
|
||||||
{
|
{
|
||||||
if (preg_match('/(int|double|float|decimal|real|numeric|serial|bit)/is', $type)) {
|
if (0 === strpos($type, 'set') || 0 === strpos($type, 'enum')) {
|
||||||
|
$bind = PDO::PARAM_STR;
|
||||||
|
} elseif (preg_match('/(int|double|float|decimal|real|numeric|serial|bit)/is', $type)) {
|
||||||
$bind = PDO::PARAM_INT;
|
$bind = PDO::PARAM_INT;
|
||||||
} elseif (preg_match('/bool/is', $type)) {
|
} elseif (preg_match('/bool/is', $type)) {
|
||||||
$bind = PDO::PARAM_BOOL;
|
$bind = PDO::PARAM_BOOL;
|
||||||
|
|||||||
Reference in New Issue
Block a user