codeigniter next row

I'm trying to initially show the first row result when clicking on a link and then allow the next row to come up by clicking on a "Next" button. I've got the first row result showing, but I can't figure out how to allow the next row to come up on a click.
You can see the page at
Click on a chapter link and it returns the first results of that chapter.
I would appreciate any assistance.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ahmed MerghaniSoftware EngineerCommented:
Hi avir,

Can you explain more?
avirAuthor Commented:
Hi Ahmed
I don't know what additional information I could add. What else would you need to know?
 I would like to know how I could make an additional query, after making the initial query which returns the first row, that would return the next row. And so on.
Ahmed MerghaniSoftware EngineerCommented:
Can you show us the "index" function that list the chapters?
Why links -at chapter 1 for example- goes to the same point? I think you need to add "itemID" to the link which will be used to refer to the NEXT row.
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

avirAuthor Commented:
I'm not sure what you mean by index function. These are the columns in my items db table which is joined to the book of isaiah db table on  verseId:

itemId | image | chapter | verse | title | label | link | dsslink | verseId

and I'm simply returning all the rows that belong to any particular chapter.
Are you suggesting that I increment  itemId inorder to go to the next row?
Ahmed MerghaniSoftware EngineerCommented:
There is a function that shows all the chapters when we call the link:

Open in new window

When you do not specify the called funciton in the url, CodeIgniter default function is "index". That what was I am talking about.
Now the issue is in that page, for example, all "View Chapter" links for chapter 1 has the same link!!
I think the links should be something like this:

Open in new window

Open in new window

and so on
avirAuthor Commented:
Oh okay, that index function.  Anyways I think I see where you are going with this and it might be a good idea.
I guess I just have to increment the itemId in the query for each "Next".
Ahmed MerghaniSoftware EngineerCommented:
Yes that what I mean, if you insure that itemId is serial numbers. Then, "NEXT" will be this itemId + 1.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
avirAuthor Commented:
Thanks for your help, though I'm having some problems implementing this. But now we are rethinking the whole project and I will probably have to change queries so there's no point in dealing with this right now.
Ahmed MerghaniSoftware EngineerCommented:
Ok and your welcome.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.