php - Next button: The next row in the database that does not contain a specific value -


i have list of articles (of creatures) on hand coded php website. want put previous , next buttons.

problem is, each article or creature has unique id creatures have alternative names. in database each name creature or row in own right unqiue id.

example: on baba jaga page (id 150) , next 1 in database (id 151) baba yaga (normally links of baba yaga redirect baba jaga). each creature referenced alternative name (redirect) or unique (page visible use).

so next creature 150 in example isn't 151 152 - babe blue ox.

what code write next unique creature in chronological order? while loop or something? creatures have many alternative names next each other in database.

use can use query (i don't know schema, forget post it):

select id articles `id` > 150 , `type` = 'unique' order id asc limit 1 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

php - Accessing static methods using newly created $obj or using class Name -