select next and previous record from database [closed]
up vote
-1
down vote
favorite
have a nice time!
I am new to mysql and php, how can we query the previous and next row from database while the id is auto increment. would you mind helping me please! thanks in advance.
mysql
New contributor
yusofi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
closed as too broad by Scott, Pimp Juice IT, Toto, bertieb, fixer1234 Nov 18 at 12:34
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
up vote
-1
down vote
favorite
have a nice time!
I am new to mysql and php, how can we query the previous and next row from database while the id is auto increment. would you mind helping me please! thanks in advance.
mysql
New contributor
yusofi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
closed as too broad by Scott, Pimp Juice IT, Toto, bertieb, fixer1234 Nov 18 at 12:34
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
1
Have you tried anything? Do you have any small subset sample of data to provide?
– Pimp Juice IT
Nov 18 at 6:01
Previous and next from what? Do you have already a record selected? What you've tried?...
– Máté Juhász
Nov 18 at 9:45
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
have a nice time!
I am new to mysql and php, how can we query the previous and next row from database while the id is auto increment. would you mind helping me please! thanks in advance.
mysql
New contributor
yusofi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
have a nice time!
I am new to mysql and php, how can we query the previous and next row from database while the id is auto increment. would you mind helping me please! thanks in advance.
mysql
mysql
New contributor
yusofi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
yusofi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
yusofi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked Nov 18 at 5:18
yusofi
1
1
New contributor
yusofi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
yusofi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
yusofi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
closed as too broad by Scott, Pimp Juice IT, Toto, bertieb, fixer1234 Nov 18 at 12:34
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
closed as too broad by Scott, Pimp Juice IT, Toto, bertieb, fixer1234 Nov 18 at 12:34
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
1
Have you tried anything? Do you have any small subset sample of data to provide?
– Pimp Juice IT
Nov 18 at 6:01
Previous and next from what? Do you have already a record selected? What you've tried?...
– Máté Juhász
Nov 18 at 9:45
add a comment |
1
Have you tried anything? Do you have any small subset sample of data to provide?
– Pimp Juice IT
Nov 18 at 6:01
Previous and next from what? Do you have already a record selected? What you've tried?...
– Máté Juhász
Nov 18 at 9:45
1
1
Have you tried anything? Do you have any small subset sample of data to provide?
– Pimp Juice IT
Nov 18 at 6:01
Have you tried anything? Do you have any small subset sample of data to provide?
– Pimp Juice IT
Nov 18 at 6:01
Previous and next from what? Do you have already a record selected? What you've tried?...
– Máté Juhász
Nov 18 at 9:45
Previous and next from what? Do you have already a record selected? What you've tried?...
– Máté Juhász
Nov 18 at 9:45
add a comment |
1 Answer
1
active
oldest
votes
up vote
-2
down vote
You need to iterate through all of the answers to your query in some sort of loop until you either get what you want or the results are exhausted. Here is an example from a previous question:
https://stackoverflow.com/questions/2285600/how-to-iterate-by-row-through-a-mysql-query-in-php
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
-2
down vote
You need to iterate through all of the answers to your query in some sort of loop until you either get what you want or the results are exhausted. Here is an example from a previous question:
https://stackoverflow.com/questions/2285600/how-to-iterate-by-row-through-a-mysql-query-in-php
add a comment |
up vote
-2
down vote
You need to iterate through all of the answers to your query in some sort of loop until you either get what you want or the results are exhausted. Here is an example from a previous question:
https://stackoverflow.com/questions/2285600/how-to-iterate-by-row-through-a-mysql-query-in-php
add a comment |
up vote
-2
down vote
up vote
-2
down vote
You need to iterate through all of the answers to your query in some sort of loop until you either get what you want or the results are exhausted. Here is an example from a previous question:
https://stackoverflow.com/questions/2285600/how-to-iterate-by-row-through-a-mysql-query-in-php
You need to iterate through all of the answers to your query in some sort of loop until you either get what you want or the results are exhausted. Here is an example from a previous question:
https://stackoverflow.com/questions/2285600/how-to-iterate-by-row-through-a-mysql-query-in-php
answered Nov 18 at 5:32
grifferz
58725
58725
add a comment |
add a comment |
1
Have you tried anything? Do you have any small subset sample of data to provide?
– Pimp Juice IT
Nov 18 at 6:01
Previous and next from what? Do you have already a record selected? What you've tried?...
– Máté Juhász
Nov 18 at 9:45