Say I have this query:
SELECT characters.characters_name, comics.comics_title, comics.comics_date
FROM characters, comics, cast
WHERE characters.characters_id = cast.cast_characters_id
AND cast.cast_comics_id = comics.comics_id
AND characters.characters_name = 'Superman'
ORDER BY `comics`.`comics_date` ASC , comics.comics_title
LIMIT 0 , 30
which gives me this list:
Superman Action Comics #454 1975-02-13
Superman Green Lantern #14 1975-02-13
Superman Action Comics #455 1975-03-13
Superman Action Comics #455 1975-04-13
Now let's say I'm looking at the Action Comics #454 page itself, which shows all the different characters that star in that book, including Superman. I want the viewer to be able to click on a "next appearance" link or arrow next to Superman and have it jump to Green Lantern #14, but I can't figure out how to word the code. Is there a way to run that same code above, but then figure out where on the list the viewer is currently looking and then link them to the next entry?
I don't know if that makes any sense...