I'm having problems in this section and I can not resolve "mysqli_fetch_array () expects parameter 1 to be mysqli_result",
$Valor = mysqli_query($conexao,"SELECT SUM(Y) AS TotalY AND SUM(X) AS TotalX FROM tabela");
while($rs = mysqli_fetch_array($Valor)){
$X = $rs['Y'];
$Y = $rs['Y'];
}
Would you have any means to subtract one from the other already within the first line?