1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

php MySQL Error help.

Discussion in 'PHP & Perl' started by hawke, May 12, 2009.

  1. hawke

    hawke Power Member

    Joined:
    Nov 14, 2008
    Messages:
    644
    Likes Received:
    533
    Location:
    Ohio
    Anyone familiar with mysql that can give me an idea what is wrong with this error?

    Code:
    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in 
    /home/digitcom/public_html/xxxxxx/xxxxx/includes/callback/account/edit.php on line 60
    this is line 60 in the edit.php file:

    Code:
        while ($row = mysql_fetch_array($result)) {
     
  2. ukescuba

    ukescuba Jr. VIP Jr. VIP Premium Member

    Joined:
    Feb 24, 2008
    Messages:
    994
    Likes Received:
    634
    Occupation:
    Mobile Marketer & QR Code Junkie
    Location:
    San Antonio, TX
    Home Page:
    might need to show some more code - im just waking up and not had any morning coffee yet but it sounds like your variable $result isnt carrying any data

    if you comment out that line and do:

    print_r ($results);

    does it spit any data out?
     
  3. hawke

    hawke Power Member

    Joined:
    Nov 14, 2008
    Messages:
    644
    Likes Received:
    533
    Location:
    Ohio
    I just figured it out, the setup did not input any tables/data in the database. seems the setup files are broken in the script.
     
  4. ukescuba

    ukescuba Jr. VIP Jr. VIP Premium Member

    Joined:
    Feb 24, 2008
    Messages:
    994
    Likes Received:
    634
    Occupation:
    Mobile Marketer & QR Code Junkie
    Location:
    San Antonio, TX
    Home Page:
    yep figures you had no data to pass into your $results :)