Welcome Guest, Not a member yet? Register   Sign In
Backticks breaking complex joins when using Active Record
#4

[eluser]Brad K Morse[/eluser]
Code:
$this->db->select("c.id");
  $this->db->from("clients c");
  $this->db->join("clients_programmes cp", "c.id = cp.client_id", "left");
  $this->db->having("cp.p_close_reason", "none");
  $query = $this->db->get();

Try that, $this->db->having() might do.

Or

Code:
$this->db->select("c.id");
  $this->db->from("clients c");
  $this->db->join("clients_programmes cp", "c.id = cp.client_id", "left");
  $this->db->where("cp.p_close_reason", "none");
  $query = $this->db->get();


Messages In This Thread
Backticks breaking complex joins when using Active Record - by El Forum - 08-15-2012, 07:25 AM



Theme © iAndrew 2016 - Forum software by © MyBB