here is the table example
main_CD code
1 aa
1 bb
1 cc
2 1231
2 1232
.
that table have lots of data. but i will only use which main_CD is "1" (other data for other pages I cannot delete it)
my question is that If i got value of "cc". I want to sent pre_data ("aa") and next data ("cc")
also if i got value of "cc", pre_data would be "bb" and next_data would be "aa"