Is there an interface to do math functions (i.e. average, sum, and such) against data stored in a weblog?
Can you use a query function to query weblogs or is it only available to query sql tables directly?
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
November 03, 2007 1:31am
Subscribe [1]#1 / Nov 03, 2007 1:31am
Is there an interface to do math functions (i.e. average, sum, and such) against data stored in a weblog?
Can you use a query function to query weblogs or is it only available to query sql tables directly?
#2 / Nov 04, 2007 12:07pm
I’m a little fuzzy on what you’re going for here- there isn’t an EE interface per se- but you can run any queries you want- with SUM, AVE, whatever. You could do that via either the SQL query form- found in ‘Admin- Utilitles- SQL Manager- Query form’ - or via the query module- but I suspect I may not have fully understood the question.
That help at all? If not, could you give me an example of what you’re looking for?
#3 / Nov 04, 2007 12:12pm
I’m thinking about using a weblog to enter in data about a problem in our market place. Instead of displaying this data on our site as multiple pieces of information, I want to average the information and show it as aggregate on our site, perhaps in a widget. So as we add more results into the weblog directly, the aggregate will update automatically and dynamically.
#4 / Nov 04, 2007 12:32pm
Ah- I get it. This may be a better question in the ‘How to’ forum- and I’ll shift it there if you need to brainstorm on the idea.
‘Out of the box’ it’s not standard. But there’s no reason a query- and possibly some php- can’t handle the issue. You could do it that way in a template. It’s likely not the approach I’d take, however. I’d probably create a custom field or two to hold the aggregate data- then write an extension to calculate my numbers and insert the averages (or whatever) in that custom field- triggered on publish and update.