dblayeroo: add directQuery support

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3852 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2017-07-31 14:50:33 +00:00
parent 30391835fa
commit 443a2bcada

View File

@@ -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