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

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Website Login Issue developed in magento -

Can the constants be defined inside a model file of a framework in PHP? -