One basic db where question

#1
[eluser]luffy[/eluser]
How to use active record to implement the function:

DELETE FROM `dt_crazy` WHERE `id` = '53' AND (`from_id` = '2' OR `to_id` = '2')


$this->db->where('id', $id);
$this->db->where('from_id', 2);
$this->db->or_where('to_id', 2);
$this->db->delete('dt_crazy');


Messages In This Thread
One basic db where question - by El Forum - 01-13-2010, 07:00 AM
One basic db where question - by El Forum - 01-13-2010, 09:23 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.