Hello there
I have a dropdown field. it's value are Open, Progress and Close.
I want there is a sum from the record in database, so the data will come out like :
Open Problem = 3
Progress Problem = 22
Close Problem = 5
How to make it's happen ?
Thanks for your help
I have a dropdown field. it's value are Open, Progress and Close.
I want there is a sum from the record in database, so the data will come out like :
Open Problem = 3
Progress Problem = 22
Close Problem = 5
How to make it's happen ?
Thanks for your help
I have 30 recorded data in database, there are 1 field that contain number on it's data
How to sum(total) the data from the field and show in on the frontpage ?
Example :
ID | data1 | data 2 |
1 | 50 | 32 |
2 | 23 | 34 |
3 | 56 | 12 |
Total 129 | 68
Thanks🙂
How to sum(total) the data from the field and show in on the frontpage ?
Example :
ID | data1 | data 2 |
1 | 50 | 32 |
2 | 23 | 34 |
3 | 56 | 12 |
Total 129 | 68
Thanks🙂
Hi dedyisn,
The simplest way to do this is to add a MySQL query into the ChronoConnectivity footer box to return the total values you need.
Bob
PS This is also the answer to your other post about totals so I've merged the two topics.
The simplest way to do this is to add a MySQL query into the ChronoConnectivity footer box to return the total values you need.
Bob
PS This is also the answer to your other post about totals so I've merged the two topics.
Thanks for your response
but i'm new in php and mysql coding, can you show me some example of this query ?
Thanks
but i'm new in php and mysql coding, can you show me some example of this query ?
Thanks
Hi dedyisn,
Here's a simple example, you can find more from the MySQL documentation.
Bob
Here's a simple example, you can find more from the MySQL documentation.
$db =& JFactory::getDBO();
$query = "
SELECT SUM(`data1`) AS `total_data1`
FROM `#__some_table_name`;
";
$db->setQuery($query);
$total_data1 = $db->loadResult();
echo "Total Data 1 = ".$total_data1;
?>
Bob
This topic is locked and no more replies can be posted.