Welcome Guest, Not a member yet? Register   Sign In
[Solved] Bug in Pagination with Oracle
#1

[eluser]nebulom[/eluser]
Though I think it's not related with the Pagination class, I think it's with the construction of the Oracle db driver. I'm not familiar with CodeIgniter's core as I'm a newbie with this framework but I echoed the $sql in the query and it is
Code:
SELECT *
  FROM (SELECT inner_query.*, ROWNUM rnum
          FROM (SELECT *
                  FROM "WWW_USER_LEVEL_NAMES"
                 WHERE "SYSTEM_ID" = 27) inner_query
         WHERE ROWNUM < 4)
WHERE rnum >= 2
This should be the second page of 2 per page. I have a query that is working fine and it has this
Code:
select *
            from (
                select a.*, rownum r
                from (
                    select * from www_user_level_names where system_id = 27
                ) a
                where rownum <= :higherbound
            )
            where r > (:higherbound - :xlimit)
Where higherbound is 4 and limit is 2 per page. Guys please check as I found the first query to select rows 2 and 3 where it should be selecting 3 and 4. Thanks a lot in advance.


Messages In This Thread
[Solved] Bug in Pagination with Oracle - by El Forum - 04-28-2009, 04:22 AM
[Solved] Bug in Pagination with Oracle - by El Forum - 04-29-2009, 03:53 AM
[Solved] Bug in Pagination with Oracle - by El Forum - 05-27-2009, 01:48 AM
[Solved] Bug in Pagination with Oracle - by El Forum - 03-05-2011, 02:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB