I have this code to get the total of the price column though i want it to only sum the total of those who are in the status of "Claimed"
public function getAllSales()
{
$stmt = $this->conn->prepare("Select sum(Price) AS total From tbl_orderlist");
$stmt->execute();
$result = $stmt->fetch();
return $result;
}
Answered almost the same question earlier... LOL
Select COUNT(*) as total From tbl_orderlist WHERE status = 'Claimed';