-1
我想從數據庫中使用Codeigniter
獲得列的最小值,但不是零。獲取最小值但不爲零(0)
這是我正在使用的當前代碼,但它給了我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
是的,它的工作。感謝名單 –