Codeigniter or where Condition or in Clauses

Today, We want to share with you or where in codeigniter.In this post we will show you where condition in codeigniter, hear for codeigniter get_where multiple conditions we will give you demo and example for implement.In this post, we will learn about orwhere with an example.

How to use multiple where condition in Codeigniter?

Example 1:

$all_condition_query = ['name' => $name, 'email' => $email, 'is_active' => $is_active];



Example 2:

$all_condition_query = ['name !=' => $name, 'id <' => $id, 'is_active >' => $is_active];



orwhere in codeigniter

Example 3:
codeigniter select for update

$table = "members_info";
$id = 1;
$update = ["is_active"=>"padding"];

$query = $this->db->select()
            ->where('id', $id)
$data = $this->db->query("$query FOR UPDATE")->row_array();
$this->db->where('id', $data['id'])->update($table,$update);

I hope you get an idea about orwhere not in codeigniter.
I would like to have feedback on my blog.
Your valuable feedback, question, comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Read Also:  insert Query In Codeigniter Example Tutorial

Related FAQ

Here are some more FAQ related to this Article:

  1. Read Also:  authentication login with username or email in laravel
  2. Read Also:  How to add WhatsApp share button to your website?
  3. Read Also:  sort query order by in codeigniter Examples
  4. Read Also:  PHP Get HTTP_HOST Name using Laravel Example
  5. Read Also:  select Query In Codeigniter Example Tutorial
  6. Read Also:  Laravel 6 Advanced Subqueries Examples
  7. Read Also:  jQuery ajax pagination in php MySQLi
  8. Read Also:  Update Query In Codeigniter Example Tutorial
  9. Read Also:  current month in php
  10. Read Also:  Print last query in laravel eloquent - Examples