EN English
Version: v2.4.0

rand

Retrieve a random set of records from a table.

rand($table, $columns, $where)
rand($table, $join, $columns, $where)
Return Value
[array] A randomly ordered result set from the table.
$data = $database->rand("account", [
	"user_name",
	"email"
], [
	"user_id[>]" => 100
]);

// Example result:
// array(
// 	[0] => array(
// 		"user_name" => "foo",
// 		"email" => "foo@medoo.in"
// 	),
// 	[1] => array(
// 		"user_name" => "cat",
// 		"email" => "cat@medoo.in"
// 	)
// )