spadefoot / kohana-orm-leap

An ORM module for the Kohana PHP framework that is designed to work with all major databases.
http://spadefoot.github.io/kohana-orm-leap/
100 stars 25 forks source link

Oracle LIMIT and OFFSET $max_row_to_fetch problem #15

Closed ekarlso closed 12 years ago

ekarlso commented 12 years ago

If you use this and set $select->offset(10) and then $select->limit(10) it will gives you 1 row to many ?!

string(238) "SELECT * FROM (SELECT "t0"., ROWNUM AS "rn" FROM (SELECT \ FROM "DB_COPY" ORDER BY "STATUS" ASC) "t0" WHERE ROWNUM <= 11) WHERE "rn" >= 1; Total Pages: 72 Total Rows: 712 Requested Page: 1 Per Page:10 From Row: 1

spadefoot commented 12 years ago

Ok, I will commit a fix this evening.

spadefoot commented 12 years ago

I changed the "WHERE ROWNUM <= 11" to "WHERE ROWNUM < 11".... Please let me know if you have any further issues with it.