Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $customer = $_POST['customer'];
- $statement = $connection->prepare($sql);
- $statement->bindParam(':customer', $customer, PDO::PARAM_STR);
- $statement->bindValue(':total_value', $total_value, PDO::PARAM_INT);
- $statement->bindValue(':total_balance', $total_balance, PDO::PARAM_INT);
- $statement->execute();
- $result = $statement->fetchAll();
- $total_value_result = $statement->fetch_assoc;
- $sum = array_sum(array_column($total_value_result, 'total_value_result'));
- echo $sum['total_value'];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement