From 07fd878985d3a4f2fe5aec48f8bdf1db24e1e188 Mon Sep 17 00:00:00 2001 From: guilhermeblanco Date: Mon, 1 Mar 2010 03:55:02 +0000 Subject: [PATCH] [2.0][DDC-382] Fixed wrong DQL function call. Thanks Ismo for report and patch. --- lib/Doctrine/ORM/Query/Expr.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Doctrine/ORM/Query/Expr.php b/lib/Doctrine/ORM/Query/Expr.php index 11c20840f..8587e139c 100644 --- a/lib/Doctrine/ORM/Query/Expr.php +++ b/lib/Doctrine/ORM/Query/Expr.php @@ -463,16 +463,16 @@ class Expr } /** - * Creates a SUBSTR() function expression with the given arguments. + * Creates a SUBSTRING() function expression with the given arguments. * - * @param mixed $x Argument to be used as string to be cropped by SUBSTR() function. + * @param mixed $x Argument to be used as string to be cropped by SUBSTRING() function. * @param integer $from Initial offset to start cropping string. May accept negative values. * @param integer $len Length of crop. May accept negative values. * @return Expr\Func */ - public function substr($x, $from, $len) + public function substring($x, $from, $len) { - return new Expr\Func('SUBSTR', array($x, $from, $len)); + return new Expr\Func('SUBSTRING', array($x, $from, $len)); } /**