This commit is contained in:
2021-01-11 19:15:03 +08:00
parent ae4720057d
commit 81417b6e24
+12
View File
@@ -76,6 +76,18 @@ trait QueryTrait
}
/**
* @param string $column
* @param string $value
* @return $this
*/
public function locate(string $column, string $value): static
{
$this->where[] = 'LOCATE(' . $column . ',\'' . addslashes($value) . '\')';
return $this;
}
/**
* @param $column
* @return $this