Skip to content

group_by_expr? #24

@philoye

Description

@philoye

I found a need for a group_by_expr because backticking of the column names was getting in the way. I wanted to do something like:

   ->group_by_expr("FROM_UNIXTIME(`time`, '%Y-%m')")

A super simple patch. Not sure whether it would be of interest to you:

    /**
    * Add an unquoted expression to the list of columns to GROUP BY 
    */
    public function group_by_expr($expr) {
          $this->_group_by[] = $expr;
          return $this;
    }

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions