Search code examples
phplithium

How to use SUM aggregate function in queries with Lithium PHP framework


How to use SUM aggregate function in queries with Lithium PHP framework.

I wanted to fetch sum of a column value. How to do this in Lithium Frame work.

Thanks,


Solution

  • I got answer of question. Posting here now.

    'fields' => 'SUM(quantity) AS total',

    Where 'quantity' is column name.

    Thanks,