I have a feature that gets the record for specific id and has two links for the previous and next record. Right now I have separate queries to obtain the next id:
$query = "SELECT id FROM presentations WHERE id > '$getId' ORDER BY id ASC LIMIT 1";
$getId is the current id.
Is there a way to consolidate into one query?
Returns 2 columns:
previdandnextidsurrounding $getId