Files
kiri-core/Database/Condition/LLikeCondition.php
T
2021-02-24 18:34:57 +08:00

29 lines
448 B
PHP

<?php
declare(strict_types=1);
namespace Database\Condition;
use Snowflake\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) . '\'';
}
}