3
class Mymodel extends CI_Model
{
public function getData($passwd,$email)
{
//$flag=0;
$u->where('username', $email);
$u->where('password', $passwd);
$total = $u->count();
echo $total;
}
}
我想顯示總數。通過$u->count()
返回的行,但我得到以下錯誤如何得到no。在記錄集變量中返回的行?
一個PHP錯誤遇到
嚴重性:注意
消息:未定義的變量:U
文件名:型號/ mymodel.php
行號:10
正如錯誤所述,沒有定義名爲'$ u'的變量。 – mcserep
你在哪裏設置變量'$ u' –
謝謝大家 – John