diff --git a/src/databases/firebird.php b/src/databases/firebird.php index 7767a04..5809bd3 100644 --- a/src/databases/firebird.php +++ b/src/databases/firebird.php @@ -19,7 +19,7 @@ */ class firebird { - protected $conn; + protected $conn, $statement; /** * Open the link to the database @@ -28,9 +28,9 @@ class firebird { * @param string $user * @param string $pass */ - function __construct($db, $user, $pass) + function __construct($db, $user="sysdba", $pass="masterkey") { - $this->conn = @ibase_connect($db, $user, $pass); + $this->conn = ibase_connect($db, $user, $pass); } /** @@ -38,7 +38,20 @@ class firebird { */ function __destruct() { - @ibase_close($this->conn); + ibase_close($this->conn); } + + /** + * Wrapper function to better match PDO + * + * @param string $sql + * @return resource + */ + function query($sql) + { + $this->statement = ibase_query($this->conn, $sql); + return $this->statement; + } + } // End of firebird.php \ No newline at end of file diff --git a/src/index.php b/src/index.php index 9fdfa72..419c372 100644 --- a/src/index.php +++ b/src/index.php @@ -106,9 +106,9 @@ if(function_exists('ibase_connect')) // -------------------------------------------------------------------------- // Create the main window -$wnd = new Main(); +new Main(); // Start the GTK event loop GTK::main(); -// End of index.php \ No newline at end of file +// End of index.php