Hi again all
I am hoping you can assist with a problem I am having. I am trying to get the 'sum' of a couple of columns in noe of my tables. I am using the following code:
To explain a little $where can vary depending on search criteria.
$sqltotal = 'SELECT sum(net), sum(vat), sum(gross) FROM invoice INNER JOIN property'. $where;
echo 'SQL Total = '.$sqltotal;
$total = mysqli_query($link, $sqltotal);
$resulttotal = mysqli_fetch_row($link, $total);
The MySQL works, whenI enter it direct into the database ( It returns the 3 values I want)
However, when I try and get the same result using mysqli_fetch_row, I get the error message:
Warning: mysqli_fetch_row() expects exactly 1 parameter, 2 given in ***********
I know the DB Connection works fine.
I've been staring at this for too long and going about in circles, if anyone can assist I would be extremely grateful!