🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
https://forum.codeigniter.com/archive/index.php?thread-64966.html ``` $this->db->select('SQL_CALC_FOUND_ROWS *', false); //避免重复查询,如果限定字段却查出所有,将此处'*'换成id之类的 //此处正常带limit查询语句 // 获取总条数 $query = $this->db->query('SELECT FOUND_ROWS() AS `count`'); $totalRows = $query->row()->count; ```