cvs: pear /MDB2/tests MDB2_nonstandard_oci8.php
| From: | Lorenzo Alberton | Date: | Sun, 04 Mar 2007 22:28:23 +0000 |
| Subject: | cvs: pear /MDB2/tests MDB2_nonstandard_oci8.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-44960@lists.php.net to get a copy of this message | ||
quipo Sun Mar 4 22:28:23 2007 UTC
Modified files:
/pear/MDB2/tests MDB2_nonstandard_oci8.php
Log:
added createFunction()
http://cvs.php.net/viewvc.cgi/pear/MDB2/tests/MDB2_nonstandard_oci8.php?r1=1.4&r2=1.5&diff_format=u
Index: pear/MDB2/tests/MDB2_nonstandard_oci8.php
diff -u pear/MDB2/tests/MDB2_nonstandard_oci8.php:1.4 pear/MDB2/tests/MDB2_nonstandard_oci8.php:1.5
--- pear/MDB2/tests/MDB2_nonstandard_oci8.php:1.4 Tue Dec 19 23:00:52 2006
+++ pear/MDB2/tests/MDB2_nonstandard_oci8.php Sun Mar 4 22:28:23 2007
@@ -2,7 +2,7 @@
// +----------------------------------------------------------------------+
// | PHP versions 4 and 5 |
// +----------------------------------------------------------------------+
-// | Copyright (c) 2006 Lorenzo Alberton |
+// | Copyright (c) 2006-2007 Lorenzo Alberton |
// | All rights reserved. |
// +----------------------------------------------------------------------+
// | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB |
@@ -41,7 +41,7 @@
// | Author: Lorenzo Alberton <l.alberton@quipo.it> |
// +----------------------------------------------------------------------+
//
-// $Id: MDB2_nonstandard_oci8.php,v 1.4 2006/12/19 23:00:52 quipo Exp $
+// $Id: MDB2_nonstandard_oci8.php,v 1.5 2007/03/04 22:28:23 quipo Exp $
class MDB2_nonstandard_oci8 extends MDB2_nonstandard {
@@ -68,6 +68,15 @@
function dropTrigger($trigger_name, $table_name) {
return $this->db->exec('DROP TRIGGER '.$trigger_name);
}
+
+ function createFunction($name) {
+ $query = 'CREATE FUNCTION '.$name.'(a IN INT, b IN INT)
+RETURN INT AS
+BEGIN
+ RETURN a + b;
+END;';
+ return $this->db->exec($query);
+ }
}
?>
\ No newline at end of file