cvs: pear /MDB2/MDB2/Driver/Function oci8.php
| From: | Lukas Smith | Date: | Mon, 17 Oct 2005 09:13:54 +0000 |
| Subject: | cvs: pear /MDB2/MDB2/Driver/Function oci8.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-35639@lists.php.net to get a copy of this message | ||
lsmith Mon Oct 17 05:13:54 2005 EDT
Modified files:
/pear/MDB2/MDB2/Driver/Function oci8.php
Log:
- added executeStoredProc()
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/Function/oci8.php?r1=1.3&r2=1.4&ty=u
Index: pear/MDB2/MDB2/Driver/Function/oci8.php
diff -u pear/MDB2/MDB2/Driver/Function/oci8.php:1.3 pear/MDB2/MDB2/Driver/Function/oci8.php:1.4
--- pear/MDB2/MDB2/Driver/Function/oci8.php:1.3 Mon Oct 17 04:17:49 2005
+++ pear/MDB2/MDB2/Driver/Function/oci8.php Mon Oct 17 05:13:52 2005
@@ -42,7 +42,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
-// $Id: oci8.php,v 1.3 2005/10/17 08:17:49 lsmith Exp $
+// $Id: oci8.php,v 1.4 2005/10/17 09:13:52 lsmith Exp $
require_once 'MDB2/Driver/Function/Common.php';
@@ -55,6 +55,34 @@
*/
class MDB2_Driver_Function_oci8 extends MDB2_Driver_Function_Common
{
+ // }}}
+ // {{{ executeStoredProc()
+
+ /**
+ * Execute a stored procedure and return any results
+ *
+ * @param string $name string that identifies the function to execute
+ * @param mixed $params array that contains the paramaters to pass the stored proc
+ * @param mixed $types array that contains the types of the columns in
+ * the result set
+ * @param mixed $result_class string which specifies which result class to use
+ * @param mixed $result_wrap_class string which specifies which class to wrap results in
+ * @return mixed a result handle or MDB2_OK on success, a MDB2 error on failure
+ * @access public
+ */
+ function &executeStoredProc($name, $params = null, $types = null, $result_class = false,
$result_wrap_class = false)
+ {
+ $db =& $this->getDBInstance();
+ if (PEAR::isError($db)) {
+ return $db;
+ }
+
+ $db->debug($query, 'query');
+ $query = 'EXEC '.$name;
+ $query .= $params ? '('.implode(', ', $params).')' :
'()';
+ return $db->query($query, $types, $result_class, $result_wrap_class);
+ }
+
// }}}
// {{{ functionTable()