public static function Connection::sqlFunctionRand
public static Connection::sqlFunctionRand($seed = NULL)
SQLite compatibility implementation for the RAND() SQL function.
File
- core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php, line 258
Class
- Connection
- SQLite implementation of \Drupal\Core\Database\Connection.
Namespace
Drupal\Core\Database\Driver\sqliteCode
public static function sqlFunctionRand($seed = NULL) { if (isset($seed)) { mt_srand($seed); } return mt_rand() / mt_getrandmax(); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Database!Driver!sqlite!Connection.php/function/Connection::sqlFunctionRand/8.1.x