> if Genre Comedy have 30~ movies $MovieLisPerPage (is 5) code must create 6 pages.
Ummm... That is what LIMIT is for.
You will first do LIMIT 0, 5
Then LIMIT 5, 5
Then LIMIT 10, 5
But I think you knew that.
I don't know what else you are asking for.
Remember: I don't use PHP, so if it's a PHP question and not a MySQL question, I am probably not the right person to ask.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.