I want to get a custom column with a custom value with each row selection of table using CodeIgniter's select()
method. In a normal MySql selection query, I can do that, but using query builder syntax, the custom column is unknown.
$this->db
->select('name,\'custom_col\'')
->from('my_table')
->get();
You can do like this:
$this->db->select("'custom_col',name",FALSE)->from('my_table')->get();