Posts tagged: sql

Custom string error in CodeIginter where clause

What is the trouble? Base on CodeIgniter Database class user guide, you can pass a custom string directly to the where clause by the $this->db->where() method. Let see the flowing example, suppose that you have successfully initiated your database. … $val = 1; $this->db->where(“id='”.$val.”‘”); $this->db->get(‘mytable’); … You are sure that your table has a field […]