Advertisement
Guest User

Untitled

a guest
May 6th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.49 KB | None | 0 0
  1. <?php
  2.     $host= "192.168.0.150";
  3.     $port="3050";
  4.     $database="D:/C2 Sistemas/Sigef/Banco/SIGEF.FDB";
  5.     $stringConexao = $host.'/'.$port.':'.$database;
  6.     $user = "SYSDBA";
  7.     $pass = "masterkey";
  8.  
  9.     $con = new PDO('firebird:dbname='.$stringConexao, $user, $pass)or die('Não Conectou!');
  10.     echo 'Conectou!';
  11.     $sql = "SELECT CLI_MATRICULA, CLI_NOME FROM CLIENTES";
  12.     $query = $con->prepare($sql);
  13.     $query->execute();
  14.     while ($linha=$query->fetch()){
  15.         echo ($linha[0]."\x09".$linha[1]."\x0a");
  16.     }
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement