Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. $customer = $_POST['customer'];
  2. $statement = $connection->prepare($sql);
  3. $statement->bindParam(':customer', $customer, PDO::PARAM_STR);
  4. $statement->bindValue(':total_value', $total_value, PDO::PARAM_INT);
  5. $statement->bindValue(':total_balance', $total_balance, PDO::PARAM_INT);
  6. $statement->execute();
  7. $result = $statement->fetchAll();
  8. $total_value_result = $statement->fetch_assoc;
  9.  
  10. $sum = array_sum(array_column($total_value_result, 'total_value_result'));
  11. echo $sum['total_value'];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement