diff --git a/core/model/MySQLDatabase.php b/core/model/MySQLDatabase.php index 7f0a2a646..2efc2cf5f 100644 --- a/core/model/MySQLDatabase.php +++ b/core/model/MySQLDatabase.php @@ -806,7 +806,7 @@ class MySQLDatabase extends Database { foreach($records as $record) $objects[] = new $record['ClassName']($record); - + if(isset($objects)) $doSet = new DataObjectSet($objects); else $doSet = new DataObjectSet(); @@ -823,6 +823,13 @@ class MySQLDatabase extends Database { return 'NOW()'; } + /* + * Returns the database-specific version of the random() function + */ + function random(){ + return 'RAND()'; + } + /* * This will return text which has been escaped in a database-friendly manner * Using PHP's addslashes method won't work in MSSQL