diff --git a/src/databases/firebird.php b/src/databases/firebird.php index 64c29d3..d332e36 100644 --- a/src/databases/firebird.php +++ b/src/databases/firebird.php @@ -19,7 +19,7 @@ */ class firebird { - protected $conn, $statement; + protected $conn, $statement, $trans; private $esc_char = "''"; /** @@ -212,6 +212,41 @@ SQL; } return $count; + } + + /** + * Start a database transaction + * + * @return resource + */ + function beingTransaction() + { + if($this->trans = ibase_trans($this->conn) !== null) + { + return TRUE; + } + + return FALSE; + } + + /** + * Commit a database transaction + * + * @return bool + */ + function commit() + { + return ibase_commit($this->trans); + } + + /** + * Rollback a transaction + * + * @return bool + */ + function rollBack() + { + return ibase_rollback($this->trans); } } // End of firebird.php \ No newline at end of file diff --git a/src/windows/add_db.php b/src/windows/add_db.php index a312850..93d299d 100644 --- a/src/windows/add_db.php +++ b/src/windows/add_db.php @@ -77,7 +77,8 @@ class Add_DB extends GtkWindow { // DB File { $filelbl = new GtkLabel("Database file"); - $this->dbfile = new GtkFileChooserButton("Select a database file", Gtk::FILE_CHOOSER_ACTION_OPEN); + $this->dbfile = new GtkFileChooserButton("Select a database file", + Gtk::FILE_CHOOSER_ACTION_OPEN); $filealign = new GtkAlignment(0, 0.5, 0, 0); $filealign->add($filelbl);