我试图返回部分结果,我希望 Active Record 手动处理分页,因为 mssql 不支持偏移量。但是,以下代码无法按预期工作。
public function get_companies($search,$start,$limit)
{
$this->aws = $this->load->database('aws', TRUE);
$this->aws->select('*');
$this->aws->from('_companies');
$this->aws->order_by("Company");
**$this->aws->limit($start, $limit);**
$this->aws->like('Company', $search);
$query = $this->aws->get();
return $query->result_array();
}