By randyesq on
I am not sure if this can be done, or how to do it if it can. Here is my question:
I have a content type that has an integer field. I want to also create a computed field that adds up the integer field, but from all nodes of that content type from a certain user.
Any help is greatly appreciated!
Thanks!
Comments
it can be done-- probably
it can be done-- probably either with some php + sql or with straight sql (mysql has some rudimentary mathematical operators/functions) though it's beyond my skill atm to tell you exactly what the query should be.
===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime." -- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz
SQL Snippet
I think a database query could be done to get all nodes of a certain content type from a certain user. Then, in a loop, one could sum up the integer field and return it. I have never done any SQL queries before, so I was hoping someone could help out with that.
Anyone willing?
Thanks!