根据电子邮件ID计算蛋糕php中的行数

the*_*com 1 php cakephp cakephp-1.3

当我在php中没有计算行数时,我确实喜欢这样

   $sql=mysql_query("select * from users where username='$email'") or die("select error".mysql_query());

   $no_rows=mysql_num_rows($sql);
Run Code Online (Sandbox Code Playgroud)

但我不知道如何在蛋糕php中做到这一点,我的数据来自于此

[User] => Array
    (
        [first_name] => arjun
        [last_name] => tyagi
        [username] => arjun@gmail.com
        [phone_no] => 9569908024
        [mobile_no] => 9569908024
        [state_id] => 2
        [location_id] => 15
        [password] => cffa41a028807034b54b5849d5f4d3ca7532e701
        [confirm_password] => 12345
    )
Run Code Online (Sandbox Code Playgroud)

mar*_*ark 12

$totalUsers = $this->User->find('count', array('conditions'=>array('User.email' => $email)));
Run Code Online (Sandbox Code Playgroud)

但这实际上已经很好地记录了:http: //book.cakephp.org/2.0/en/models/retrieving-your-data.html