I downloaded a website from github and it's working fine except that it is showing warning in dashboard like this: dashboard
I want to know how to solve this. Here's the code of dashboard and line 15:
<?php require_once 'includes/header.php'; ?>
<?php
$sql = "SELECT * FROM product WHERE status = 1";
$query = $connect->query($sql);
$countProduct = $query->num_rows;
$orderSql = "SELECT * FROM orders WHERE order_status = 1";
$orderQuery = $connect->query($orderSql);
$countOrder = $orderQuery->num_rows;
$totalRevenue = "";
while ($orderResult = $orderQuery->fetch_assoc()) {
$totalRevenue += $orderResult['paid']; //line 15
}
$lowStockSql = "SELECT * FROM product WHERE quantity <= 3 AND status = 1";
$lowStockQuery = $connect->query($lowStockSql);
$countLowStock = $lowStockQuery->num_rows;
$userwisesql = "SELECT users.username , SUM(orders.grand_total) as
totalorder FROM orders INNER JOIN users ON orders.user_id =
users.user_id WHERE orders.order_status = 1 GROUP BY
orders.user_id";
$userwiseQuery = $connect->query($userwisesql);
$userwieseOrder = $userwiseQuery->num_rows;
$connect->close();
?>
Here's the database table orders: database