How to remove the slash in the where condition of codeigniter?

Member

by ryleigh , in category: PHP Frameworks , a year ago

How to remove the slash in the where condition of codeigniter?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by daisha , a year ago

@ryleigh 

In CodeIgniter, you can remove the slash in the where condition by using the following methods:

  1. Use the where() method without a preceding slash. For example:
1
$this->db->where('column_name', $value);


  1. You can also use the where() method with an array as the second parameter. For example:
1
2
$where_array = array('column_name' => $value);
$this->db->where($where_array);


  1. Additionally, you can use the where() method with custom SQL string. For example:
1
$this->db->where("column_name = $value");


By using these methods, you can remove the slash in the where condition in your CodeIgniter application.

Related Threads:

How to remove an item from cart based on condition in woocommerce?
How to remove a record by id in codeigniter?
How to remove index.php from url in codeigniter?
How to remove index.php from codeigniter path?
How to remove index.php in a codeigniter site to help seo?
How to remove a row from result_array() with codeigniter?