Member Login

Freestyle Joomla Forums

Includes: Data

Member Login   Register

Please login or register to post on the forum

Forum Index    Board Index    Last Post   

Michael Norton

Michael Norton

06 October 2015, 02:45

SQL data display

Hi, I can display data that I can SELECT from my remote SQL database but I cannot display the SUM as per query below
SELECT SUM(amount) FROM transactions;
although this works for the "test SQL" button and displays the result. I would like to simply display this total amount. Can you suggest any way I can achieve this.
Link showing problem
Joomla Version Joomla 3.4.1
Freestyle Version Includes data
Pro/Lite Pro
Adam Clarke

Adam Clarke

06 October 2015, 11:32

Re: SQL data display


You need to provide an alias of your SUM column, so use the SQL:

SELECT SUM(amount) as ammount_total FROM transactions;

and then in your item template, you can use


to output the value.


Adam Clarke
Freestyle Joomla
Michael Norton

Michael Norton

06 October 2015, 12:54

Re: Audit Message

Thank you, worked a treat. Cheers

Vote For Us!

Please vote for our software or write a review of one of our products on the Joomla! Extensions Directory