Quote:
Originally Posted by savingsangel
UPDATE: Nevermind. With trial and error I got it. This is going to be great!
- - - -
UPDATE PART 2: I'm having trouble getting more than one cdp to work at the same time. All I need is:
SUM(field5) as sum_att_views
FROM " . TABLE_PREFIX . "userfield
WHERE userid=".$user['userid']);
SUM(field6) as sum_att_views
FROM " . TABLE_PREFIX . "userfield
WHERE userid=".$user['userid']);
SUM(field7) as sum_att_views
FROM " . TABLE_PREFIX . "userfield
WHERE userid=".$user['userid']);
SUM(field8) as sum_att_views
FROM " . TABLE_PREFIX . "userfield
WHERE userid=".$user['userid']);
...along with the appropriate names for VBE to work with... How can I pull in 5-6 custom values from the database? Can you give me an example xml file that uses more than one that I can edit with my labels and values?
|
Why not trying to sum it in one single query, like this?
SELECT
SUM(field1) as sum_att_views1,
SUM(field2) as sum_att_views2
FROM userfield
WHERE userid=x