I am trying to come up with a SQL statement that will display x (say 10) records, with the one meeting the search criterion in the center as the x/2 record (or the 5th record). I could try this
Code: Select all
SELECT * FROM RECORDS WHERE id <= wanted-x/2 AND id > wanted+x/2