in reply to Re^2: Calculating previous/next from database
in thread Calculating previous/next from database
Then, to get everything in a single query, you do:CREATE TABLE images ( id INT ,prev_id INT ,next_id INT ,other_columns_here );
Not that hard. :-)SELECT * FROM images WHERE ( (id=?) OR (next_id=?) OR (prev_id=?) );
|
|---|