diff --git a/lib/Doctrine/Expression/Mysql.php b/lib/Doctrine/Expression/Mysql.php index 3118c91d2..985a37d0c 100644 --- a/lib/Doctrine/Expression/Mysql.php +++ b/lib/Doctrine/Expression/Mysql.php @@ -41,6 +41,15 @@ class Doctrine_Expression_Mysql extends Doctrine_Expression { return 'RLIKE'; } + /** + * return string to call a function to get random value inside an SQL statement + * + * @return string to generate float between 0 and 1 + */ + public function random() + { + return 'RAND()'; + } /** * build a pattern matching string *