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.










share|improve this question







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.











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















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.










share|improve this question







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.











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













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.










share|improve this question







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






share|improve this question







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.











share|improve this question







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.









share|improve this question




share|improve this question






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 2 days ago









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.




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














  • 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










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






share|improve this answer




























    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






    share|improve this answer

























      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






      share|improve this answer























        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






        share|improve this answer












        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







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 days ago









        grifferz

        58725




        58725















            Popular posts from this blog

            flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

            Mangá

             ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕