I want to pull data from MySQL. I try this
<?php
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select(array($db->quoteName('total_amount')));
$query->from($db->quoteName('money'));
$db->setQuery($query);
$results = $db->loadResult();
?>
<?php echo $results; ?>
but it gives me a single result. What I want is, to pull all data from the column and put it separately. What is the mistake?