FaaPz\PDO\Clause\Grouping implements QueryInterface
Used by Join clauses.
Parameter | Description |
---|---|
$rule |
Rule to use when combining conditionals |
$clauses |
Array of conditionals to combine |
use FaaPz\PDO\Clause\Conditional;
use FaaPz\PDO\Clause\Grouping;
// ... WHERE col1 = ? AND (col2 = ? OR col3 = ?)
$statement->where(
new Grouping('AND', [
new Conditional('col1', '=', 'val1'),
new Grouping('OR', [
new Conditional('col2', '=', 'val2'),
new Conditional('col3', '=', 'val3')
])
]);