Files
kiri-databases/Condition/LLikeCondition.php
T

29 lines
471 B
PHP
Raw Normal View History

2022-01-09 03:49:51 +08:00
<?php
declare(strict_types=1);
namespace Database\Condition;
use Kiri\Core\Str;
/**
* Class LLikeCondition
* @package Database\Condition
*/
class LLikeCondition 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 . ' LIKE \'%' . addslashes($this->value) . '\'';
}
}