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

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -