I am trying to learn so bare with me. I have figured out how to sum the total of a column for a particular user but I don't know how to convert the query result to be able to use curly brackets for display in emails,thank you pages, etc.
Here is the code I am using:
Can anyone help please? Thank you
Gabe
Here is the code I am using:
<?php
$user = &JFactory::getUser();
$db =& JFactory::getDBO();
// Make a MySQL Connection
$query = "SELECT *, SUM(balance) FROM my_table WHERE userid = $user->id";
$result = mysql_query($query) or die(mysql_error());
?>
Can anyone help please? Thank you
Gabe