公共函数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();
}
请帮助!