aggiefan
08 Jun 2007, 03:49
I'm coding a page in a new hack I'm building and am trying to sum a column using a where condition. Here's the code I'm using:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Essentially, I want the sum of all values in the donation_amount column where the donation_sport column is football. I just want to display the result -- no other special use for it. I'm getting a "RESOURCE ID #81" when I print $pledgeamount, so thought maybe I had to clean it up and so did the $pledge code part...that just comes up blank.
I've done hacks before for Vbulletin, but never had to use a Sum statement. Is there something special I need to do?
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Essentially, I want the sum of all values in the donation_amount column where the donation_sport column is football. I just want to display the result -- no other special use for it. I'm getting a "RESOURCE ID #81" when I print $pledgeamount, so thought maybe I had to clean it up and so did the $pledge code part...that just comes up blank.
I've done hacks before for Vbulletin, but never had to use a Sum statement. Is there something special I need to do?