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 268

Class

Connection
SQLite implementation of \Drupal\Core\Database\Connection.

Namespace

Drupal\Core\Database\Driver\sqlite

Code

1
2
3
4
5
6
public static function sqlFunctionRand($seed = NULL) {
  if (isset($seed)) {
    mt_srand($seed);
  }
  return mt_rand() / mt_getrandmax();
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.