ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
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; ```