を使用してデータベースから列のゼロではなく最小値を取得したいCodeigniter
。
これは私が使用している現在のコードですが、列の値も0であるため、0が返されます。
$this->db->select_min('saleprice');
$this->db->join('category_products', 'category_products.product_id=products.id', 'right');
$this->db->where('category_products.category_id', $cat_id);
$this->db->where('products.enabled',1);
return $this->db->get('products')->row_array();
0ではなく最小値を取得する方法を教えてください