'Transferred Call' and b.fila = '$dac' order by 1"; //echo $query; $result = pg_query($dbcon, $query); $numrow = 0; $linhas = ""; $duracaoTotal = ''; while ($row = pg_fetch_array($result)) { $hora = $row["hora"]; $destino = ocultarTelefone($row["origem"]); $tempo = SecondToStrTime($row["tmo"]); $agente = $row["agente"]; $ramalAgente = $row["ramal_agente"]; //$proto = $row["protocolo"]; $proto = substr($row["protocolo"], 0, 4) . "-" . substr($row["protocolo"], 4); $linhas .= "