php thinkphp 怎么下面语句不能读取数据库某一字段?
$model=M(user);$_SESSION['username']=$_POST['uname'];$s=$_SESSION['username']$model->...
$model=M(user);
$_SESSION['username']=$_POST['uname'];
$s=$_SESSION['username']
$model->field('all_point')->where('username=$s')->select();
var_dump($model);
:(
SQLSTATE[42S22]: Column not found: 1054 Unknown column '$s' in 'where clause'
$model那行报错 展开
$_SESSION['username']=$_POST['uname'];
$s=$_SESSION['username']
$model->field('all_point')->where('username=$s')->select();
var_dump($model);
:(
SQLSTATE[42S22]: Column not found: 1054 Unknown column '$s' in 'where clause'
$model那行报错 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询