im trying to get a SUM from 2 diff queries and then subtract them but i dont know how. im trying something like this
<?php
include("config.php");
$link=Conectarse();
$suma=mysql_query("select SUM(cantidad) as total from 'movimientos' where tipo='0'",$link);
$resta=mysql_query("select SUM(cantidad) as total from 'movimientos' where tipo='1'",$link);
?>
but it's possible to make something like
$total = $suma - $resta; ??