sandrob57 Posted March 10, 2007 Share Posted March 10, 2007 Real quick, for some reason it is displaying nothing for the donations variable. $result = dbquery("SELECT SUM(donations) FROM fusion_users WHERE donations>0"); $data_donations = dbarray($result); echo "Total Donations: $".$data_donations['donations'].""; Link to comment https://forums.phpfreaks.com/topic/42075-solved-quick-sql-help/ Share on other sites More sharing options...
per1os Posted March 10, 2007 Share Posted March 10, 2007 try this: echo "Total Donations: $".$data_donations['SUM(donations)'].""; Or this: $result = dbquery("SELECT SUM(donations) Donations FROM fusion_users WHERE donations>0"); $data_donations = dbarray($result); echo "Total Donations: $".$data_donations['Donations'].""; --FrosT Link to comment https://forums.phpfreaks.com/topic/42075-solved-quick-sql-help/#findComment-204088 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.