How can I get no data?
学容错
学容错 2018-10-18 00:03:20
0
3
1144

 /***

* Get username

*/

 public function left(){

$admin_id = session('admin_id');

$user_name=M("admin");

$user_name=$user_name->where($admin_id )->find();

$this->assign('user_name',$user_name);

$this->display();

}

用户名:<td>{$user_name}</td>

学容错
学容错

reply all(3)
手机用户119203370

Where should give the query field, such as where('id',$admin_id)

Summer

First, check whether your $user_name has got a value; then check

胤彬-

Is the where syntax wrong?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template