Location: PHPKode > scripts > Interbase > interbase/interbase_examples.php
<?php
/**
 * Autor: Vinicius Gallafrio/BR - hide@address.com
 * Date : 24/01/2002
 * http://www.72k.net
 * 
 * Description: PHP Class for Interbase Connection
 */
 
  // EXAMPLE FOR SELECT
  include "class.interbase.php";
  $ibase = New interbase('/path/to/database.gdb','sysdba','masterkey',0);
  $ibase->query("SELECT field FROM table");                       /*  ^-- change to 1 for debug mode */
  
  while ($ibase->movenext()) { 
  			echo $ibase->getfield("field");
  }
   
  // EXAMPLE FOR INSERT
  include "class.interbase.php";
  $ibase = New interbase('/path/to/database.gdb','sysdba','masterkey',0);
  $ibase->query("INSERT INTO table (field) values ('value')");
  

  // EXAMPLE FOR UPDATE
  include "class.interbase.php";
  $ibase = New interbase('/path/to/database.gdb','sysdba','masterkey',0);
  $ibase->query("UPDATE table SET field='newvalue' WHERE fieldID=1");

  
  // EXAMPLE FOR DELETE
  include "class.interbase.php";
  $ibase = New interbase('/path/to/database.gdb','sysdba','masterkey',0);
  $ibase->query("DELETE FROM table WHERE fieldID=1");

?>
Return current item: Interbase