I have this code and it works perfectly well:
$res=mysql_query('SELECT ((SELECT SUM(mball_h) FROM pr) + (SELECT
SUM(mball_i) FROM pr)) AS theSum');
while($row=mysql_fetch_array($res))
then i echo with this
<?php echo $row['theSum']; ?>
Now, I want to do this:
SUM(mball_h) from pr WHERE mball_0 = $_SESSION['SESS_mball_0']
Here is the code that does not work"
$res=mysql_query('SELECT ((SELECT SUM(mball_h) FROM pr WHERE mball_0 =
$_SESSION["SESS_mball_0"]) + (SELECT SUM(mball_i) FROM pr WHERE mball_0 =
$_SESSION["SESS_mball_0"])) AS theSum');
while($row=mysql_fetch_array($res))
What am I not doing right?