-2
您想幫助我嗎?如何將這個sql查詢更改爲活動記錄在笨加入到活動記錄codeigniter
LEFT JOIN MGMETADATA.services d ON d.protocol = e.protocol and d.port = e.s_port
感謝,
您想幫助我嗎?如何將這個sql查詢更改爲活動記錄在笨加入到活動記錄codeigniter
LEFT JOIN MGMETADATA.services d ON d.protocol = e.protocol and d.port = e.s_port
感謝,
請儘量將
$this->db->select('*');
$this->db->from('tableE');
$this->db->join('tableD','tableD.protocol=tableE.protocol and tableD.port=tableE.s_port','left');
$query = $this->db->get();
return $query->result();
我希望這可以幫助你
$this->db->select("*")
->join("MGMETADATA.services as d","d.protocol = e.protocol","left")
->where("d.port = e.s_port")
->get("tablename e")
->result(); //for json format
注:不要使用「*」選擇所有列,請使用單個列名進行檢索。
它是你的完整查詢嗎? –