【发布时间】:2012-04-15 09:40:02
【问题描述】:
当我计算 php 中的行数时,我确实喜欢这样
$sql=mysql_query("select * from users where username='$email'") or die("select error".mysql_query());
$no_rows=mysql_num_rows($sql);
但我不知道如何在 cake 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
)
【问题讨论】:
标签: php cakephp cakephp-1.3