diff --git a/drivers/firebird/firebird_result.php b/drivers/firebird/firebird_result.php index c209bd6..15f6dfa 100644 --- a/drivers/firebird/firebird_result.php +++ b/drivers/firebird/firebird_result.php @@ -31,6 +31,71 @@ class Firebird_Result extends PDOStatement { { $this->statement = $link; } + + // -------------------------------------------------------------------------- + + /** + * Invalidate method for data consistency + * + * @param mixed $column + * @param mixed &$param + * @return FALSE + */ + public function bindColumn($column, &$param, $type=NULL, $maxlen=NULL, $driverdata=NULL) + { + return FALSE; + } + + // -------------------------------------------------------------------------- + + /** + * Invalidate method for data consistency + * + * @param mixed $parameter + * @param mixed &$variable + * @param int $data_type + * @return FALSE + */ + public function bindParam($parameter, &$variable, $data_type=NULL, $maxlen=NULL, $driverdata=NULL) + { + return FALSE; + } + + // -------------------------------------------------------------------------- + + /** + * Invalidate method for data consistency + * + * @param mixed $parameter + * @param mixed &$variable + * @param int $data_type + * @return FALSE + */ + public function bindValue($parameter, $variable, $data_type=NULL) + { + return FALSE; + } + + // -------------------------------------------------------------------------- + + /** + * Run a prepared statement query + * + * @param array $args + * @return bool + */ + public function execute($args = NULL) + { + //Add the prepared statement as the first parameter + array_unshift($args, $this->statement); + + // Let php do all the hard stuff in converting + // the array of arguments into a list of arguments + // Then pass the resource to the constructor + $this->__construct(call_user_func_array('fbird_execute', $args)); + + return $this; + } // -------------------------------------------------------------------------- @@ -101,27 +166,6 @@ class Firebird_Result extends PDOStatement { // -------------------------------------------------------------------------- - /** - * Run a prepared statement query - * - * @param array $args - * @return bool - */ - public function execute($args = NULL) - { - //Add the prepared statement as the first parameter - array_unshift($args, $this->statement); - - // Let php do all the hard stuff in converting - // the array of arguments into a list of arguments - // Then pass the resource to the constructor - $this->__construct(call_user_func_array('fbird_execute', $args)); - - return $this; - } - - // -------------------------------------------------------------------------- - /** * Return the number of rows affected by the previous query * @@ -143,6 +187,18 @@ class Firebird_Result extends PDOStatement { { return count($this->fetchAll()); } + + // -------------------------------------------------------------------------- + + /** + * Method to emulate PDOStatement->errorCode + * + * @return string + */ + public function errorCode() + { + return fbird_errcode(); + } // -------------------------------------------------------------------------- diff --git a/tests/db_files/FB_TEST_DB.FDB b/tests/db_files/FB_TEST_DB.FDB index c75f825..25cbbeb 100644 Binary files a/tests/db_files/FB_TEST_DB.FDB and b/tests/db_files/FB_TEST_DB.FDB differ