namespace Home\Model;
use Think\Model;
Class UserModel extends Model{
protected $fields = array('id', 'name','pwd','email','time','_pk'=>'id');
}
?>
$m=D('User');
$d["name"]="meizhou";
$info=$m->where($d)->select();

如果换成M('User')方法的话就行;
$m=M('User');
$d["name"]="meizhou";
$info=$m->where($d)->select();

是哪里写错了吗?
如果->where($value) 当$value为数组时
好像只有int类型的能识别到,字符串类型时$value的值就是不能传进去
最佳答案