SVEN/webseite/sys/sources/envms-fluentpdo/tests/58-groupby-array-param.phpt
2020-07-04 12:07:02 +02:00

25 lines
435 B
PHP

--TEST--
Query with select, group, having, order
--FILE--
<?php
include_once dirname(__FILE__) . "/connect.inc.php";
/* @var Envms\FluentPDO\Query */
$query = $fluent
->from('user')
->select(null)
->select('count(*) AS total_count')
->groupBy(array('id', 'name'));
echo $query->getQuery() . "\n";
print_r($query->fetch());
?>
--EXPECTF--
SELECT count(*) AS total_count
FROM user
GROUP BY id,name
Array
(
[total_count] => 1
)