modify
This commit is contained in:
@@ -123,7 +123,11 @@ trait Builder
|
||||
if (empty($where)) return '';
|
||||
if (is_string($where)) return $where;
|
||||
foreach ($where as $key => $value) {
|
||||
$_value = is_string($value) ? $value : $this->conditionMap($value);
|
||||
if (is_string($value) || is_string($key)) {
|
||||
$_value = is_string($key) ? sprintf('%s=\'%s\'', $key, $value) : $value;
|
||||
} else {
|
||||
$_value = $this->conditionMap($value);
|
||||
}
|
||||
|
||||
if (empty($_value)) continue;
|
||||
|
||||
@@ -201,7 +205,7 @@ trait Builder
|
||||
$condition[2] = $this->_hashMap($condition[2]);
|
||||
}
|
||||
$builder = Snowflake::createObject(['class' => OrCondition::class, 'value' => $condition[2], 'column' => $condition[1], 'oldParams' => $array]);
|
||||
}else if (isset(ConditionClassMap::$conditionMap[$stroppier])) {
|
||||
} else if (isset(ConditionClassMap::$conditionMap[$stroppier])) {
|
||||
$defaultConfig = ConditionClassMap::$conditionMap[$stroppier];
|
||||
$create = array_merge($defaultConfig, ['column' => $condition[1], 'value' => $condition[2]]);
|
||||
$builder = Snowflake::createObject($create);
|
||||
|
||||
Reference in New Issue
Block a user