This commit is contained in:
2023-12-12 15:35:35 +08:00
parent 510a13e3da
commit e2c0f62532
32 changed files with 922 additions and 1095 deletions
+15 -15
View File
@@ -10,20 +10,20 @@ namespace Database\Condition;
class HashCondition extends Condition
{
/**
* @return string
* @throws \Exception
*/
public function builder(): string
{
$array = [];
if (count($this->value) < 1) {
throw new \Exception('Builder data by a empty array.');
}
foreach ($this->value as $key => $value) {
$array[] = $key . '=' . addslashes($value);
}
return implode(' AND ', $array);
}
/**
* @return string
* @throws
*/
public function builder(): string
{
$array = [];
if (count($this->value) < 1) {
throw new \Exception('Builder data by a empty array.');
}
foreach ($this->value as $key => $value) {
$array[] = $key . '=' . addslashes($value);
}
return implode(' AND ', $array);
}
}