Welcome Guest, Not a member yet? Register   Sign In
Activerecord postgresql column names containing uppercase characters
#1

[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.




Theme © iAndrew 2016 - Forum software by © MyBB