垃圾教程 哪有什么get静态方法,直接
User::where('id', 1)->find()
Db::table('数据表名')
->where("id",">",10)//范围 这里用id作为索引
->field('username')//想要查找的字段
->select();返回
array(2) { ["obj"] => object(app\index\model\Obj)#6 (0) { } ["de"] => object(app\index\model\De)#7 (2) { ["obj"] => object(app\index\model\Obj)#8 (0) { } ["arr"] => array(0) { } } }
这种格式吗 array { object {} , object { object {}, array{} } }
这个是我数据表的原因
看看有没有继承 Model
关键应该有没有设置主键吧?!