Files
kiri-databases/Condition/NotLikeCondition.php
T

27 lines
458 B
PHP
Raw Normal View History

2022-01-09 03:49:51 +08:00
<?php
declare(strict_types=1);
namespace Database\Condition;
/**
* Class NotLikeCondition
* @package Database\Condition
*/
class NotLikeCondition extends Condition
{
public string $pos = '';
/**
* @return string
*/
public function builder(): string
{
if (!is_string($this->value)) {
$this->value = array_shift($this->value);
}
return $this->column . ' NOT LIKE \'%' . addslashes($this->value) . '%\'';
}
}