Welcome Guest, Not a member yet? Register   Sign In
How to get data of joined table using query() method
#2

PHP Code:
public function showProduct(){
    
$this->db->select('category.*, COALESCE(SUM(product.cost),0) as price'false)
         ->
join('product''product.cId = category.cId')
         ->
groupBy('category.cId');

    return $this;

Reply


Messages In This Thread
RE: How to get data of joined table using query() method - by iRedds - 02-22-2021, 03:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB