Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Sep 2011
    Posts
    50
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Question how to echo multiple rows

    I want to retrieve multiple rows(containing same username) from table mysql. But i don't want to use loop. I want to know if mysql_result() or mysql_data_seek() can retrieve multiple rows or not?

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,519
    Thanks
    8
    Thanked 1,090 Times in 1,081 Posts
    The result is usually put into an array.
    What do you plan on doing with the array?

  • #3
    New Coder
    Join Date
    Sep 2011
    Posts
    50
    Thanks
    4
    Thanked 0 Times in 0 Posts
    I used mysql_result() to retrieve a specific row but then the following error came:

    Warning: mysql_result() [function.mysql-result]: Unable to jump to row 1 on MySQL result index 3 in /home/.../public_html/jobs/MyAccount/myaccount.php on line 64

    Firstly, I want to retrieve to retrieve all rows containing same username in the table and then i want to select some specific rows among the previously retrieved all rows. Then i want to collect contents from cells in those specific rows and then want to assign variables to these contents. But why is the above error coming. Please tell me where is the problem.
    Last edited by sunnynosid; 02-29-2012 at 02:33 AM.

  • #4
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,519
    Thanks
    8
    Thanked 1,090 Times in 1,081 Posts
    I suppose you could show us the script?


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •