diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-02-18 18:13:57 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-02-18 18:13:57 +0100 |
commit | 8991e4505adba2dae8afe7b7941ec744bfe78712 (patch) | |
tree | 179b89e711bdb1d5e456f10da9c99c86d7461cae /lib/private/db/statementwrapper.php | |
parent | 1e84d6b14b56a4df39550b590051c2bfff900a9c (diff) | |
parent | 504645cf00f797290a530d93bb27d65150901c4c (diff) | |
download | nextcloud-server-8991e4505adba2dae8afe7b7941ec744bfe78712.tar.gz nextcloud-server-8991e4505adba2dae8afe7b7941ec744bfe78712.zip |
Merge pull request #6796 from owncloud/statementwrapper-bindparam
Add bindParam to the database statement wrapper
Diffstat (limited to 'lib/private/db/statementwrapper.php')
-rw-r--r-- | lib/private/db/statementwrapper.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/private/db/statementwrapper.php b/lib/private/db/statementwrapper.php index a71df315e2f..f98bfb716dc 100644 --- a/lib/private/db/statementwrapper.php +++ b/lib/private/db/statementwrapper.php @@ -172,4 +172,18 @@ class OC_DB_StatementWrapper { public function fetchOne($colnum = 0) { return $this->statement->fetchColumn($colnum); } + + /** + * Binds a PHP variable to a corresponding named or question mark placeholder in the + * SQL statement that was use to prepare the statement. + * + * @param mixed $column Either the placeholder name or the 1-indexed placeholder index + * @param mixed $variable The variable to bind + * @param integer|null $type one of the PDO::PARAM_* constants + * @param integer|null $length max length when using an OUT bind + * @return boolean + */ + public function bindParam($column, &$variable, $type = null, $length = null){ + return $this->statement->bindParam($column, $variable, $type, $length); + } } |