php - How to use select in Codeigniter's Query Builder -
given following code:
$this->db->select();
the parameters in select function names of columns selected data base.
suppose 1 of parameters inserted is: count(column_name)
.
does mean 1 row selected? (because count returns single value)
you can use this:
$this->db->select('count(column_name) total, other_column_name'); $this->db->from('table_name');
Comments
Post a Comment