Results 1 to 2 of 2

Thread: mysql_fetch_row

  1. #1

    Thread Starter
    Addicted Member TheGoldenShogun's Avatar
    Join Date
    Mar 2001
    Location
    VA/MD... anywhere around the beltway
    Posts
    236

    mysql_fetch_row

    How do you go to the next row for the mysql_fetch_row command? I have tables that have more than just one row of information but I want to get them element by element (like $result[1]." ".$result[2]) and then go to the next row. mysql_result for the query lets you specify which row with the second argument to that function but I haven't been able to find how to increment this sucker.

  2. #2
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    i'd use mysql_fetch_array instead. Use in a while loop, like this
    PHP Code:
    while ($row mysql_fetch_array($resultfromquery)) {
        print 
    "$row["NameOfField"]<br>";

    That would output each row
    Last edited by chrisjk; Feb 25th, 2002 at 01:40 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width