Welcome Guest, Not a member yet? Register   Sign In
Active record, offset limit with mssql
#1

[eluser]0plus1[/eluser]
I encountered a small problem, I have a methiod inside a model:

Code:
function lista($limit="0",$offset="0")
    {
        $query = $this->db->get('AN_ANAGRAFICA_AZIENDE', $limit, $offset);
        return $query->result();
    }
When I call it from the controller and then push the result from the list I get incremental results:

Code:
$data['lista'] = $this->Mana->lista(10,120);

Theoretically I would start from record 120 and limit results by ten, in reality it returns 130 rows.. How come? The same thing happens the other way around..

Can you explain what I'm doing wrong/missing?

Thank you


Messages In This Thread
Active record, offset limit with mssql - by El Forum - 07-09-2009, 07:15 AM
Active record, offset limit with mssql - by El Forum - 07-09-2009, 07:50 AM
Active record, offset limit with mssql - by El Forum - 07-09-2009, 08:00 AM
Active record, offset limit with mssql - by El Forum - 07-09-2009, 08:04 AM
Active record, offset limit with mssql - by El Forum - 07-09-2009, 08:13 AM
Active record, offset limit with mssql - by El Forum - 07-09-2009, 08:18 AM
Active record, offset limit with mssql - by El Forum - 07-09-2009, 08:22 AM
Active record, offset limit with mssql - by El Forum - 07-09-2009, 08:54 AM
Active record, offset limit with mssql - by El Forum - 07-09-2009, 09:07 AM
Active record, offset limit with mssql - by El Forum - 07-09-2009, 09:15 AM
Active record, offset limit with mssql - by El Forum - 07-09-2009, 02:32 PM
Active record, offset limit with mssql - by El Forum - 07-13-2009, 06:22 PM



Theme © iAndrew 2016 - Forum software by © MyBB