Results 1 to 5 of 5
  1. #1
    Newbie
    Join Date
    January 18th, 2005
    Posts
    38
    This is what I am getting:

    if ($row = mysql_fetch_array($result)) {

    Im new with this. And I have searched all over for an hour and have not found the answer yet.

    I use phpmyadmin. I know very little of this all, its been a week and I am this far in learning.
    thanks in advance.

    Doh! I posted the wrong thing! here ya go this is what I am now getting as a result of changing the ($result))
    to
    ()
    ------
    Parse error: parse error, unexpected ';' in /usr/local/plesk/xxxx/vhosts/xxxxxxxxxxxxxx/httpdocs/xxx.php on line 30
    ------
    and line 30 is:
    -----
    } while($row = mysql_fetch_array();

    -----

    [This message was edited by wendy on September 01, 2002 at 12:11 AM.]

  2. #2
    ABW Ambassador cditty's Avatar
    Join Date
    January 18th, 2005
    Location
    Memphis TN
    Posts
    1,434
    Your fetch_array() needs to have the $result in it. Also you should have the { behind it.

    Without seeing more of the code, it is a little hard to troubleshoot.

    Chris

  3. #3
    Newbie
    Join Date
    January 18th, 2005
    Posts
    38
    Great thanks, that was it, now things are moving along. Thank you!

  4. #4
    ABW Ambassador
    Join Date
    January 18th, 2005
    Location
    ÄúsTrálíĺ
    Posts
    1,372
    Yes, the format should be

    while($row = mysql_fetch_array($result)) {

    echo $row["animal_name"];
    echo "<BR>\n";
    }

    where animal_name is the name of a field returned in your query.

    An example query would be (& this should be placed before the above code)

    $result = mysql_query('SELECT *
    FROM animals
    WHERE animal_type="dog"');

  5. #5
    Newbie
    Join Date
    January 18th, 2005
    Posts
    38
    Thanks!

  6. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Work and work... Work your fingers to the bone!
    By jc101 in forum Newbie Affiliate FAQs & Helpful Articles
    Replies: 4
    Last Post: February 15th, 2004, 06:00 PM
  2. Replies: 8
    Last Post: December 16th, 2003, 09:16 AM

Posting Permissions

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