PHP code example of spfalz / db_oci8

1. Go to this page and download the library: Download spfalz/db_oci8 library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

spfalz / db_oci8 example snippets

`

 new \spfalz\db_oci8;
$db->Connect();
$mver = $db->Version();
$db->Disconnect();
echo("Your Oracle Server is V".$mver);
`

$db->QueryResult("SELECT ENAME FROM EMP");
while($data = $db->FetchResult())
  {
  echo("Employee: ".$data['ENAME']."<br>\n");
  }
$db->FreeResult();
`

..
..
$bindvars = array('empno' => 7900);
$query    = 'SELECT ENAME,JOB FROM EMP WHERE EMPNO = :empno';
$result = $db->QueryHash($query, OCI_ASSOC,0, $bindvars);
..
..