1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Custom field total in site header

Discussion in 'XenForo Development Discussions' started by ubiquitas, Jun 12, 2014.

  1. ubiquitas

    ubiquitas Member

    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

    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 :LOL:
    cdub likes this.
  2. ubiquitas

    ubiquitas Member

    sorted it - custom helper did the trick - thanks :p
  3. cdub

    cdub Well-Known Member

    Ok how do you do this? I don't know how to code.

Share This Page