Welcome Guest, Not a member yet? Register   Sign In
active record where()
#1

[eluser]Unknown[/eluser]
codeigniter 1.7
$this->db->where("role='admin' OR role='superadmin'");

produces:

WHERE `role='admin'` OR role='superadmin'

note the extra quotes
#2

[eluser]Derek Allard[/eluser]
did you use the third parameter?

Quote:$this->db->where() accepts an optional third parameter. If you set it to FALSE, CodeIgniter will not try to protect your field or table names with backticks.




Theme © iAndrew 2016 - Forum software by © MyBB