# Find 通过条件查询,将返回一条记录 > find($columns, $where) 中文 : 查找(返回字段, 条件); columns [string/array] 返回的字段列. where (optional) [array] WHERE 条件. Return: [string/array] 返回查询到的数据. ~~~ //查找 user 等于 admin的数据 并返回pass $User = M("User"); $pass = $User->find("pass", array( "user" => "admin" )); //查找条件与上一致 返回 更多字段的数据 $data = $User->find(array( "email", "user", "pass" ), array( "user" => "admin" )); // $data = array( // "email" => "admin@a.com", // "user" => "admin", // "pass" => "admin" // ) $pass = $User->find("*", array( "user" => "admin" )); //返回 所有字段 //中文语法 $User = M("User"); $pass = $User->查找("pass", array( "user" => "admin" )); ~~~