mysql_xdevapi\TableSelect
PHP Manual

TableSelect::groupBy

(No version information available, might only be in Git)

TableSelect::groupBySet select grouping criteria

说明

public mysql_xdevapi\TableSelect mysql_xdevapi\TableSelect::groupBy ( mixed $sort_expr )

Sets a grouping criteria for the result set.

参数

sort_expr

The grouping criteria.

返回值

A TableSelect object.

范例

Example #1 mysql_xdevapi\TableSelect::groupBy() example

<?php

$res 
$table->select('count(b) as bb')->groupBy('b')->orderBy('b asc')->execute();

?>

mysql_xdevapi\TableSelect
PHP Manual