Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5756573d8d | |||
| eb75e69d60 | |||
| 6745036672 |
+2
-2
@@ -822,8 +822,8 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, T
|
||||
throw new Exception('You need add static method `tableName` and return table name.');
|
||||
}
|
||||
$table = trim($this->table, '{{%}}');
|
||||
if (!empty($tablePrefix) && !str_starts_with($this->table, $tablePrefix)) {
|
||||
$table = $tablePrefix . $this->table;
|
||||
if (!empty($tablePrefix) && !str_starts_with($table, $tablePrefix)) {
|
||||
$table = $tablePrefix . $table;
|
||||
}
|
||||
return '`' . $connection->database . '`.' . $table;
|
||||
}
|
||||
|
||||
@@ -522,7 +522,7 @@ trait QueryTrait
|
||||
$conditionArray = $this->sprintf($conditionArray, $value, $opera);
|
||||
}
|
||||
|
||||
$this->where = ['(' . implode(' AND ', $this->where) . ') OR (' . $conditionArray . ')'];
|
||||
$this->where = ['((' . implode(' AND ', $this->where) . ') OR (' . $conditionArray . '))'];
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user