CodeIgniter Forums

Full Version: Activerecord postgresql column names containing uppercase characters
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Acidrain[/eluser]
Code:
$this->db->select('usr.access, firm.name');
$this->db->from('users AS usr');
$this->db->join('companies AS firm', 'firm.firmID=usr.firmID');
$this->db->where('usr.userID', 6);

When writing the query manually in postgresql, I have to wrap column names inside double quotes if they contain uppercase characters.

The upper code however does not work with or without the quotes around column names. Without the quotes it simply does not join the needed data. No errors either. With quotes it throws error since activerecord tries to add own quotes also.

I think this is something to do with postgresql column names having uppercase characters, can anyone help?

EDIT: Updated my codeigniter version and solved the problem. Sorry for inconvenience.