gather the sum of all numbers in a column named money from a sql database
<?php $db = new PDO('mysql:host=localhost;dbname=example_database', 'user', 'pass'); $query = "SELECT SUM(money) FROM user_table"; $results = $db->query($query); print_r($results); ?>