Responsive Ad Area

Share This Post

test

Update query with AND & OR condition in codeigniter

I want to update query in code-igniter framework with AND & OR condition. Below is simple query:

UPDATE tbl_test SET name='test' WHERE id=1 AND (fname='r1' OR fname='r2');

Below is CodeIgniter syntax i tried:

$updateData_next_schdule['name'] = 'test';
$this->db->update('tbl_test', $updateData_next_schdule, array('id' => 1, ['fname' => 'r1','fname' => 'r2']));

But it is not working as expected. Please help on this.


Update query with AND & OR condition in codeigniter
Update query with AND & OR condition in codeigniter
test
{$excerpt:n}

Share This Post

Leave a Reply

Your email address will not be Publishedd. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Skip to toolbar