At the moment if I am doing a query on the database that should only return one row, using:
...query stuff... $query = $this->db->get(); $ret = $query-
This is better way as it gives you result in a single line:
$this->db->query("Your query")->row()->campaign_id;