我需要一点帮助。
我如何使用 codeigniter 发送此查询?
Delete FROM friendconnect WHERE who = 5 and whos = 1 OR whos = 5 and who = 1;
我只发现:
$this->db->where('id', $id);
$this->db->delete('mytable');
谢谢大家!
$this->db->where('who', 5);
$this->db->where('whos', 1);
$this->db->or_where('whos', 5);
$this->db->where('who', 1);
$this->db->delete('friendconnect');
这也是一种替代方案:
$this->db->where('who', 5)->where('whos', 1)->or_where('whos', 5)->where('who', 1);
$this->db->delete('friendconnect');
这也是:
$this->db->where(array('who'=>5, array('whos'=>1)))->or_where('whos', 5)->where('who', 1);
$this->db->delete('friendconnect');
更多信息:here
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)