Hmmm…. it looks like your query has a LIMIT 20 included… is that working ok? (Dunno if you’re running the code you provided on production or not.)
You could expand the LIMIT parameter to include a starting point. See here for more details. If that’s working, then you’d probably want to use a get parameter (?page=x) for paging. Take the get parameter, multiply by number of items per page, and you have the starting record for your LIMIT query.