SUBSTRING_INDEX与codeigniter中的GROUP_CONCAT不起作用

时间:2018-12-14 19:18:10

标签: mysql sql codeigniter

公共函数getProductsById($ id)
    {

    $this->db->select('product.*,SUBSTRING_INDEX(GROUP_CONCAT(product_properties.name), " ", 4) as pname');       
    $this->db->from('product');        
    $this->db->where('product.subcategory_id',$id);                
    $this->db->join('product_properties','product_properties.product_id=product.id');
    $this->db->group_by('product_properties.product_id');
    return @$this->db->get()->result_array();
}

This is the error i see

请帮助!

0 个答案:

没有答案