Gracias Mortiprogramador
Ya encontre la solucion con lo que me has guiado aqui esta el resultado de la ultima consulta.
Código PHP:
Ver original<?php
if (isset($_GET['route'])) $route = $_GET['route']; if (isset($_GET['drug_id'])) $cid = $_GET['drug_id']; $conexion = mysqli_connect($dbhost,$dbuser,$dbpass,$dbdatabase) or
die ('error'); // Conexión $sql = "SELECT drug_id,
SUM(case route when 'po' then `count` else 0 end) totalPO,
SUM(case route when 'iv' then `count` else 0 end) totalIV,
SUM(IF(route='po',count,NULL)) AS Total
FROM core_reports_antiinfectives";
$coma=0;
?>
<?php echo $Total = $row["Total"]; ?>