pub rstoetter cSmartSqlStatement cSmartSqlStatement::AddGroupByClause() - rstoetter/csmartsqlstatement-php GitHub Wiki

Method AddGroupByClause( ) - of API Reference pub

 public   mixed rstoetter\cSmartSqlStatement\cSmartSqlStatement::AddGroupByClause(string $str_clause)
  • Namespace : rstoetter\cSmartSqlStatement
  • Class name: cSmartSqlStatement
  • This method is defined by the class rstoetter\cSmartSqlStatement\cSmartSqlStatement

The method AddGroupByClause( ) adds a new GROUP BY clause to the existing GROUP BY The whole statement will be rescanned

Example:

$obj_sql_statement = new cSmartSqlStatement('select'); $query = "select * from tbl group by a, b "; $obj_sql_statement->ScanStatement( $query ); $obj_sql_statement->AddGroupByClause( ' x, y, z ' );

Arguments

  • $str_clause string - <p>the GROUP BY elements to add</p>