Creating a Variable that is the Sum of Two Other Variables
- by John
Hello,
For the code below, I would like to make a new variable called totalScore2 that equals days + totalScore.
How can I do this?
Thanks in advance,
John
$sqlStr = "SELECT
l.loginid,
l.username,
l.created,
DATEDIFF(NOW(), l.created) AS days,
COALESCE(s.total, 0) AS countSubmissions,
COALESCE(c.total, 0) AS countComments,
COALESCE(s.total, 0) * 10 + COALESCE(c.total, 0) AS totalScore