I've created a couple custom fields with numerical values that I would, eventually, like to be averaged. I'm trying to take it one step at a time, and first trying to get the values summed together.

I am not as experienced with PhP, and having some issues developing a proper script for the code.


    $sql= "Select `fid11`, `fid12` (`fid11`+`fid12`) as TOTAL FROM mybb_userfields WHERE `ufid` = `1` ";
    echo $sql;?>

This is something that I am wanting to have unique on each member's profile. A couple things that I am having issues is the general code and getting the sum done and value of that sum displayed.

The other is that, since this is something unique, the end of the code WHERE ufid, would be the user id of the row in the database, that would also be the member page the user is currently on. I placed 1 in there, to test the code and see if an output would be displayed for myself.

-- Ohnoto

Disregard this message. I was able to obtain what I needed through a javascript code.


Forum Jump:

Users browsing this thread: 1 Guest(s)