<?php
!defined('FRAMEWORK_PATH') && exit('Accesss Deined');
class user_control extends base_control {
    public function on_index(){
        // 方法 2 
        $user_list = DB::T('user')->select([
            'group' => 'id',
            'id' => ['<=', 100],
        ], 'id DESC', -1);
        // 方法 2 需要建立 user extends base_model
        $user_list = $this->user->select([
            'group' => 'id',
            'id' => ['<=', 100],
        ], 'id DESC', -1);
    }
}

在 mzphp 中,group是保存字,所以字段名不能是 group 哦~

results matching ""

    No results matching ""