Quantcast
Channel: Miaz Akemapa | Sense of Life
Viewing all articles
Browse latest Browse all 31

PHP-MySql: Select previous row and next row from current ID

$
0
0
During the dark age, the simplest way to get previous row from current ID was using this query: SELECT field1 FROM tablename WHERE id = ($currentId – 1) and to get next row: SELECT field1 FROM tablename WHERE id = ($currentId + 1) But there’s a problem. Like common data, we need to delete some […]

Viewing all articles
Browse latest Browse all 31

Trending Articles