select next and previous record from database [on hold]
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
put on hold as too broad by Scott, Pimp Juice IT, Toto, bertieb, fixer1234 2 days ago
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
put on hold as too broad by Scott, Pimp Juice IT, Toto, bertieb, fixer1234 2 days ago
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
2 days ago
Previous and next from what? Do you have already a record selected? What you've tried?...
– Máté Juhász
2 days ago
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
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
New contributor
New contributor
asked 2 days ago
yusofi
1
1
New contributor
New contributor
put on hold as too broad by Scott, Pimp Juice IT, Toto, bertieb, fixer1234 2 days ago
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.
put on hold as too broad by Scott, Pimp Juice IT, Toto, bertieb, fixer1234 2 days ago
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
2 days ago
Previous and next from what? Do you have already a record selected? What you've tried?...
– Máté Juhász
2 days ago
add a comment |
1
Have you tried anything? Do you have any small subset sample of data to provide?
– Pimp Juice IT
2 days ago
Previous and next from what? Do you have already a record selected? What you've tried?...
– Máté Juhász
2 days ago
1
1
Have you tried anything? Do you have any small subset sample of data to provide?
– Pimp Juice IT
2 days ago
Have you tried anything? Do you have any small subset sample of data to provide?
– Pimp Juice IT
2 days ago
Previous and next from what? Do you have already a record selected? What you've tried?...
– Máté Juhász
2 days ago
Previous and next from what? Do you have already a record selected? What you've tried?...
– Máté Juhász
2 days ago
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 2 days ago
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
2 days ago
Previous and next from what? Do you have already a record selected? What you've tried?...
– Máté Juhász
2 days ago