From 443a2bcadadb83ab9fa17d503000c629537c72d4 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Mon, 31 Jul 2017 14:50:33 +0000 Subject: [PATCH] dblayeroo: add directQuery support git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3852 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- dblayeroo.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dblayeroo.php b/dblayeroo.php index 3ab1b66..7c22343 100644 --- a/dblayeroo.php +++ b/dblayeroo.php @@ -2835,6 +2835,21 @@ class dblayeroo $this->DBException ("execute : command not defined : no RC"); } } + /* }}} */ + + /** Execute a non prepared query in the database context. + * As there is no verification, this method is DANGEROUS and should not be + * used ! + * @param string $sql The SQL request to directely send to the database + * @return PDOStatement The PDO Statement to traverse + */ + public function directQuery ($sql) + /* {{{ */ + { + if (! key_exists ($this->dsn, self::$instance)) + $this->DBException ("Direct query without established connection"); + return self::$instance[$this->dsn]->query ($sql); + } /* }}} */ /** Error management