count Github

function counting number of records inside requested recordset.
Default parameter is: $id = '*', $as_sql = false
If parameter $as_sql = true return simple sql command, else - return query result

from('table')->count();

max Github

SQL aggregate MAX()
Default parameter is: $pk = null, $as_sql = false
If parameter $as_sql = true return simple sql command, else - return query result

from('table')->max();

min Github

min SQL aggregate MIN()
Default parameter is: $pk = null, $as_sql = false
If parameter $as_sql = true return simple sql command, else - return query result

from('table')->min();

avg Github

SQL aggregate AVG()
Default parameter is: $pk = null, $as_sql = false
If parameter $as_sql = true return simple sql command, else - return query result

from('table')->avg();

sum Github

SQL aggregate SUM()
Default parameter is: $pk = null, $as_sql = false
If parameter $as_sql = true return simple sql command, else - return query result

from('table')->sum();

first Github

Return first item from resultset
Default parameter is: $select = null, $use_cache = false
If parameter $use_cache = true return cached query result

from('table')->first();

last Github

Return last item from resultset
Default parameter is: $select = null, $use_cache = false
If parameter $use_cache = true return cached query result

from('table')->last();