mini\Table\AbstractTable::like() Method

public abstract

Signature

public abstract function like(string $column, string $pattern): mini\Table\Contracts\TableInterface

Parameters

Name Type Default Description
$column string required Documentation missing
$pattern string required Documentation missing

Returns

mini\Table\Contracts\TableInterface

Documentation

Filter rows where column matches a LIKE pattern

Supports SQL LIKE wildcards:

  • % matches any sequence of characters
  • _ matches any single character
$table->like('name', 'John%');     // Starts with "John"
$table->like('email', '%@gmail.com'); // Ends with "@gmail.com"
$table->like('code', 'A_B');       // "A" + any char + "B"

Inherited From

mini\Table\Contracts\TableInterface

Source

src/Table/Contracts/TableInterface.php:141