Bladephp: Now with 8+ codeigniter, php, and laravel project 8+ php project From $37/Month From Rs. 2499/Month

or_where condition in Codeigniter

codeigniter mysql
or_where condition in Codeigniter

When someone trying to or conditions using active record database library in codeigniter. This function is identical to the one above, except that multiple instances are joined by OR.

Note: or_where() was formerly known as orwhere(), which has been removed.

Let’s create a or_where method in codeigniter

$this->db->where('username !=', $username);
$this->db->or_where('id >', $id);  // Produces: WHERE username != 'alex' OR id > 20


Html code work in comment box

Related Post