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

Member

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

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

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by daisha , a month 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.