codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
<?php //get previous and next ids of current id using SQL query echo "select field1, field2 , ( select min(id) from yourtable where id > t.id ) as next_id , ( select max(id) from yourtable where id < t.id ) as prev_id from yourtable as t where id = 937"; ?>
Private
[
?
]
Run code
Submit