Welcome Guest, Not a member yet? Register   Sign In
Active Record Delete
#1

[eluser]Kemik[/eluser]
Hello,

Is it possible to add an "OR" to the active record delete? I want to delete a record where the permission_id = 7 or 8.

$this->db->where('id', $id);
$this->db->delete('mytable');

If not, I'll just use the regular $query = "INSERT QUERY HERE";
$query = $this->db->query($query);

Thanks.
#2

[eluser]Michael Wales[/eluser]
Code:
$this->db->where('id', '7');
$this->db->orwhere('id', '8');
$this->db->delete('mytable');
#3

[eluser]Kemik[/eluser]
Thanks walesmd. I should look at the userguide in more detail in future.




Theme © iAndrew 2016 - Forum software by © MyBB