cvs: pear /MDB2/tests MDB2_nonstandard_mysql.php

From: Date: Sun, 04 Mar 2007 22:51:06 +0000
Subject: cvs: pear /MDB2/tests MDB2_nonstandard_mysql.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-44963@lists.php.net to get a copy of this message
quipo Sun Mar 4 22:51:06 2007 UTC Modified files: /pear/MDB2/tests MDB2_nonstandard_mysql.php Log: added createFunction() http://cvs.php.net/viewvc.cgi/pear/MDB2/tests/MDB2_nonstandard_mysql.php?r1=1.3&r2=1.4&diff_format=u Index: pear/MDB2/tests/MDB2_nonstandard_mysql.php diff -u pear/MDB2/tests/MDB2_nonstandard_mysql.php:1.3 pear/MDB2/tests/MDB2_nonstandard_mysql.php:1.4 --- pear/MDB2/tests/MDB2_nonstandard_mysql.php:1.3 Sat Dec 9 21:58:23 2006 +++ pear/MDB2/tests/MDB2_nonstandard_mysql.php Sun Mar 4 22:51:06 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_mysql.php,v 1.3 2006/12/09 21:58:23 quipo Exp $ +// $Id: MDB2_nonstandard_mysql.php,v 1.4 2007/03/04 22:51:06 quipo Exp $ class MDB2_nonstandard_mysql extends MDB2_nonstandard { @@ -64,6 +64,12 @@ function dropTrigger($trigger_name, $table_name) { return $this->db->exec('DROP TRIGGER '.$trigger_name); } + + function createFunction($name) { + $query = 'CREATE FUNCTION '.$name.'(a INT, b INT) RETURNS INT +RETURN a + b;'; + return $this->db->exec($query); + } } ?> \ No newline at end of file

« previous php.pear.cvs (#44963) next »