Welcome Guest, Not a member yet? Register   Sign In
Active Record 'where'-issues


I just upgraded a larger website from CI2 to CI3.0.3. and runned into active record problems:

The following statement runned fine in CI2.2 but not in CI3.0.3:

$this->db->where(array('id BETWEEN 0 AND ' => '171'));
$r = $this->db->get('gemeinde')->query_result();

Error log:

Error Number: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'BETWEEN0 AND '171'' at line 3
SELECT * FROM `gemeinde` WHERE `id` BETWEEN0 AND '171'

It seems that in CI3 the space between 'BETWEEN' and 0 is removed? What do I miss here?

Thanks Martin

Theme © iAndrew 2016 - Forum software by © MyBB