Hi i have this code in php to update a balance field in $table5. Now my problem is that when one of the two fields i.e. add
or sub
is NULL then this does not return balance.
$fetch_balance = mysql_query("SELECT (SUM (IFNULL(`add`,0))-(SUM (IFNULL(`sub`,0))) AS `bal` FROM `".$table5."` ");
Please help.