我需要一些帮助。 如何使用codeigniter发送此查询?
new ServiceTransformer<ReactivatePrepaidSubscriberInput, ReactivatePrepaidSubcriberOutput>(....){}
我发现只有:
Delete FROM friendconnect WHERE who = 5 and whos = 1 OR whos = 5 and who = 1;
谢谢大家!
答案 0 :(得分:3)
$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
答案 1 :(得分:-1)
只需使用此$this->db->query("Delete FROM friendconnect WHERE who = 5 and whos = 1 OR whos = 5 and who = 1");
答案 2 :(得分:-1)
$this->db->where('(who = 5 and whos = 1) OR (whos = 5 and who = 1)');
$this->db->delete('friendconnect');