Added transaction functions to firebird driver
This commit is contained in:
parent
c938964260
commit
09b0b1fbe3
@ -19,7 +19,7 @@
|
||||
*/
|
||||
class firebird {
|
||||
|
||||
protected $conn, $statement;
|
||||
protected $conn, $statement, $trans;
|
||||
private $esc_char = "''";
|
||||
|
||||
/**
|
||||
@ -213,5 +213,40 @@ 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
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user