ok, I'm a beginner with XF and PHP so go easy...
I have a custom field (numeric), I want to show the total value from all users in my website header.
SQL to get the total (which works) is
SELECT
SUM(field_value) as MyTotal
FROM xf_user_field_value
WHERE field_id = 0x4B6472486F6C64696E67
so um, what next - I'm hoping there is a simple few lines of PHP I can dump in the appropriate template.
thanks for even reading this far
I have a custom field (numeric), I want to show the total value from all users in my website header.
SQL to get the total (which works) is
SELECT
SUM(field_value) as MyTotal
FROM xf_user_field_value
WHERE field_id = 0x4B6472486F6C64696E67
so um, what next - I'm hoping there is a simple few lines of PHP I can dump in the appropriate template.
thanks for even reading this far