<?php
  ob_start('ob_gzhandler');
  require_once('config.php');
  $sql = "select nrovenda from pedidos where nropedido = ".$_GET["nropedido"];
  $query = ibase_query($conexao, $sql) or die(ibase_errmsg());
  $row = ibase_fetch_object($query);
  if ($row != null) {
    $array = array();
    $array[] = $row;
    echo json_encode($array);
  } else
    echo "";
?>