- Posts: 20
- Thank you received: 0
Donated amount sould be SUMed in query [DONE]
- Corey DeLasaux
- Topic Author
- Offline
- Junior Member
-
Less
More
16 years 1 month ago - 15 years 11 months ago #782
by Corey DeLasaux
Donated amount sould be SUMed in query [DONE] was created by Corey DeLasaux
Instead of having the total amount on the campaign table, it should be SUMed in a mysql query. Since it seems to be broken in the campaign module anyway.
Example (well sort of, I'm not proficient in SQL)
I'm sure you could make a better statement but should serve as example.
Example (well sort of, I'm not proficient in SQL)
Code:
SELECT campaign_id, SUM(amount) FROM t0r4j_jd_donors WHERE published=1 GROUP BY campaign_id;
or
SELECT campaign_id, SUM(amount) AS TotalDonated FROM t0r4j_jd_donors WHERE published=1 AND campaign_id=1 GROUP BY campaign_id;
I'm sure you could make a better statement but should serve as example.
Last edit: 15 years 11 months ago by Corey DeLasaux.
Please Log in or Create an account to join the conversation.
- Corey DeLasaux
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 20
- Thank you received: 0
16 years 1 month ago #812
by Corey DeLasaux
Replied by Corey DeLasaux on topic Re:Donated amount sould be SUMed in query
BTW this would work good for multiple campaign abilities and could be loaded into a array.

Please Log in or Create an account to join the conversation.
- Corey DeLasaux
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 20
- Thank you received: 0
15 years 11 months ago #1191
by Corey DeLasaux
Replied by Corey DeLasaux on topic Re:Donated amount sould be SUMed in query
AHha, I noticed you have this done, Thank you

Please Log in or Create an account to join the conversation.
Moderators: Mr. Dam, Dũng Nguyễn Việt
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.