Hi I am building a lottery system on my site I am having some trouble though
function jackpot() {
// show a users friend project money
$sql = "select SUM(cash) from friend_lottery_pool";
$result = executeQuery($sql);
while ($line = mysql_fetch_assoc($result)) {
return $line['cash'];
}
}
this code will not return the total sum but if I run the mysql part in phpmyadmin it works, how can I get the sum of this to show?