Welcome Guest, Not a member yet? Register   Sign In
db_join adds new record to left table
#1

here is my model function
Code:
class Tincture_model extends CI_Model {
    
    function get_records()
    {
        $this->db->select('tincture.*,ps_product_lang.name as ps_name,tincture.name as tincture_name ' );
        $this->db->join('ps_product_lang', 'tincture.ps_product_id = ps_product_lang.id_product ','left');
        $this->db->group_by('tincture.tincture_id');
        $query = $this->db->get('tincture');
        return  $query->result();
    }
Every time I run it it duplicates the last record of table tincture.
Reply


Messages In This Thread
db_join adds new record to left table - by alfred.laggner - 01-22-2015, 09:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB