You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
useFaaPz\PDO\Database;
useFaaPz\PDO\Statement\Select;
$database = newDatabase('mysql:host=localhost;dbname=test_db;charset=UTF8');
// (SELECT id FROM table1) UNION (SELECT id FROM table2) UNION (SELECT id FROM table3) $database->select(['id'])
->from('table1')
->union($database->select(['id'])->from('table2'));
->union($database->select(['id'])->from('table3'));
unionAll(SelectInterface $query): self
Parameter
Description
$query
Union query to append
useFaaPz\PDO\Database;
useFaaPz\PDO\Statement\Select;
$database = newDatabase('mysql:host=localhost;dbname=test_db;charset=UTF8');
// (SELECT id FROM table1) UNION ALL (SELECT id FROM table2) UNION ALL (SELECT id FROM table3) $database->select(['id'])
->from('table1')
->unionAll($database->select(['id'])->from('table2'));
->unionAll($database->select(['id'])->from('table3'));
groupBy(string ...$columns): self
Parameter
Description
$columns
One or more columns to group by
useFaaPz\PDO\Database;
useFaaPz\PDO\Statement\Select;
$database = newDatabase('mysql:host=localhost;dbname=test_db;charset=UTF8');
// SELECT * FROM table1 GROUP BY col1, col2 $database->select()
->from('table')
->groupBy('col1', 'col2');
having(ConditionalInterface $clause): self
Parameter
Description
$clause
Having conditional clause
useFaaPz\PDO\Database;
useFaaPz\PDO\Clause\Conditional;
useFaaPz\PDO\Statement\Select;
$database = newDatabase('mysql:host=localhost;dbname=test_db;charset=UTF8');
// SELECT * FROM table HAVING col1 > ? $database->select()
->from('table')
->having(newConditional('col1', '>', 0));