Welcome Guest, Not a member yet? Register   Sign In
Creating Active Record Query
#5

[eluser]xtremer360[/eluser]
I tried the following and have an invalid ut8 character string "champion" error

Code:
$this->db->select($this->titles_table.'.title_name');
        $this->db->select($this->roster_table.'.condender_no');

        $this->db->select($this->roster_table.'.roster_name');
        $this->db->select("CASE WHEN c.contender_no = 0 THEN ‘Champion’ ELSE ‘Contender’ END as champion", FALSE);
        $this->db->select($sl,false);

        $this->db->from($this->titles_table);
        $this->db->join($this->roster_table, $this->titles_table.'.roster_id ='. $this->roster_table.'.id', 'inner');
        $this->db->join($this->title_champions_table, $this->titles_table.'.id ='. $this->title_champions_table.'.title_id', 'inner');
      
        $query = $this->db->get();  
        if ($query->num_rows() > 0) return $query->result();
  return array();


Messages In This Thread
Creating Active Record Query - by El Forum - 06-20-2012, 10:17 AM
Creating Active Record Query - by El Forum - 06-20-2012, 02:20 PM
Creating Active Record Query - by El Forum - 06-20-2012, 02:53 PM
Creating Active Record Query - by El Forum - 06-20-2012, 02:57 PM
Creating Active Record Query - by El Forum - 06-21-2012, 09:11 AM
Creating Active Record Query - by El Forum - 06-21-2012, 11:03 AM
Creating Active Record Query - by El Forum - 06-21-2012, 11:04 AM
Creating Active Record Query - by El Forum - 06-21-2012, 02:39 PM
Creating Active Record Query - by El Forum - 06-22-2012, 10:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB