改名
This commit is contained in:
@@ -466,7 +466,7 @@ trait QueryTrait
|
|||||||
if (!is_array($column)) {
|
if (!is_array($column)) {
|
||||||
$column = explode(',', $column);
|
$column = explode(',', $column);
|
||||||
}
|
}
|
||||||
foreach ($column as $key => $val) {
|
foreach ($column as $val) {
|
||||||
$this->select[] = $val;
|
$this->select[] = $val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -513,12 +513,11 @@ trait QueryTrait
|
|||||||
* @param string $opera
|
* @param string $opera
|
||||||
* @return QueryTrait
|
* @return QueryTrait
|
||||||
*/
|
*/
|
||||||
public function whereAnd(string $columns, string|int|null|bool $value = NULL, string $opera = '='): static
|
public function whereAnd(string $columns, string $opera = '=', string|int|null|bool $value = NULL): static
|
||||||
{
|
{
|
||||||
if (!is_numeric($value) && !is_bool($value)) {
|
[$columns, $opera, $value] = $this->opera(...func_get_args());
|
||||||
$value = '\'' . $value . '\'';
|
|
||||||
}
|
$this->where[] = $this->sprintf($columns, $value, $opera);
|
||||||
$this->where[] = $columns . $opera . $value;
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user