<?php
/**
* Autor: Vinicius Gallafrio/BR - vinicius@72k.net
* 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");
?> |