Get Started

Upgrade

Where Syntax

Query

Aggregation

Fetch

Transaction

Management

Advanced

Raw object

PDO object

Debug

Information

version: 2.1.12

rand

Fetch data from the table randomly.

rand($table, $column, $where)
rand($table, $join, $column, $where)
Return: [array] Random data from the table.
$data = $database->rand("account", [
	"user_name",
	"email"
], [
	"user_id[>]" => 100
]);

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