intenta
Código PHP:
<?
include "Conectar.php";
$Dpagado=0;
$query = "select * from bubble $Where order by ID";
$result = mysql_query($query);
if($result){
while($line=mysql_fetch_array($result)){
if ($line['l3']==1){
$Dpagado = $Dpagado+$line['acobrar'];
}
}
echo $Dpagado ;
}else{
echo('error en sentencia SQL:'.mysql_error());
}
?>