Welcome Guest, Not a member yet? Register   Sign In
DB Active record bug in CI 1.7.x
#1

[eluser]KeyStroke[/eluser]
Hi,

After upgrading the database files in CI to 1.7.x, I've noticed that, when using active records, and when I don't add spaces around the equal sign in the "where" clause like this:
Code:
$this->db->select('*')->from('user,city')->where('user.city_id=city.id')->get();

I get the following error:
Quote: A Database Error Occurred

Error Number: 1054

Unknown column ‘user.city_id=city.id’ in ‘where clause’

SELECT * FROM (`user`, `city`) WHERE `user`.`city_id=city`.`id`
A workaround has been posted within this thread:
http://ellislab.com/forums/viewthread/10...15/#533910




Theme © iAndrew 2016 - Forum software by © MyBB