如何编写具有AS的Postgresql查询以更改CodeIgniter中的列名

I am trying to get values of a column(CATALOG_NBR) in CodeIgniter but somehow i think it do not take column names with underscore. Now i want to rename the column name by using AS. I search for it in the documentation but did not find the answer.

My Query:

/* $code is parameter that i am taking from URL (combination of values from SUBJECT and CATALOG_NBR column) */ 

$param = str_split($code, 4);
$row = $this->db->get_where('PS_CU_CRSE_CTLG_VW', array('SUBJECT' => $param[0], 'CATALOG_NBR'   => $param[1]))->row_array();

In where clause inside array i am using CATALOG_NBR which is not working fine. I want to rename it somehow as i have tried running the query in Postgre and it works when you rename the column.

Thanks !!!

You can specify an alias in the select clause, like this:

$this->db->select('column AS alias')->from('table')->where('column', $condition)->get()->result();