cvs: pear /MDB2/MDB2/Driver/Function Common.php
| From: | Ali Fazelzadeh | Date: | Tue, 12 Feb 2008 13:33:38 +0000 |
| Subject: | cvs: pear /MDB2/MDB2/Driver/Function Common.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-50985@lists.php.net to get a copy of this message | ||
afz Tue Feb 12 13:33:38 2008 UTC
Modified files:
/pear/MDB2/MDB2/Driver/Function Common.php
Log:
Add T-SQL replace function
http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Function/Common.php?r1=1.19&r2=1.20&diff_format=u
Index: pear/MDB2/MDB2/Driver/Function/Common.php
diff -u pear/MDB2/MDB2/Driver/Function/Common.php:1.19
pear/MDB2/MDB2/Driver/Function/Common.php:1.20
--- pear/MDB2/MDB2/Driver/Function/Common.php:1.19 Sun Sep 9 13:47:36 2007
+++ pear/MDB2/MDB2/Driver/Function/Common.php Tue Feb 12 13:33:38 2008
@@ -42,7 +42,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
-// $Id: Common.php,v 1.19 2007/09/09 13:47:36 quipo Exp $
+// $Id: Common.php,v 1.20 2008/02/12 13:33:38 afz Exp $
//
/**
@@ -147,6 +147,20 @@
}
// }}}
+ // {{{ replace()
+
+ /**
+ * return string to call a function to get replace inside an SQL statement.
+ *
+ * @return string to call a function to get a replace
+ * @access public
+ */
+ function replace($str, $from_str, $to_str)
+ {
+ return "REPLACE($value , $from_str , $to_str)";
+ }
+
+ // }}}
// {{{ concat()
/**