log
优质
小牛编辑
129浏览
2023-12-01
Rand
随机获取数据。
rand($table, $column, $where)table [string]
The table name.
column [string]
The target column will be calculated.
where (optional) [array]
The WHERE clause to filter records.
table [string]
The table name.
join [array]
Table relativity for table joining.
column [string]
The target column will be calculated.
where (optional) [array]
The WHERE clause to filter records.
返回数组[array]
$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"// )// )