#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 1999
    Location
    Monroe, WA, USA
    Posts
    4
    Rep Power
    0
    I am receiving a very strange error when running a while loop to pull out rows from a mySQL db using PHP....
    Warning: Supplied argument is not a valid MySQL result resource in /home/tribaloutpost/public_html/teamwa/tribescon/roster.php3 on line 40


    Line 40 is the beginning of the while loop which looks like...

    while($myrow = mysql_fetch_array($result)) {
    $list[$myrow['id']] = $myrow["$sortby"];
    }

    Any ideas? I am in deperate need. Thanks
  2. #2
  3. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,640
    Rep Power
    4476
    That error usually means that your query did not return any data to put in $result. After your mysql_db_query()command, put:

    echo "Error is " . mysql_error();

    That might give you some more specifics. It could be any number of things...post what mysql_error outputs and someone can probably give some more help..

    ---John Holmes
    ---www.SepodatiCreations.com

Similar Threads

  1. Custom error message for MySQL connection
    By dbr1066 in forum PHP Development
    Replies: 6
    Last Post: February 12th, 2004, 11:25 AM
  2. Codepupil
    By Adachic in forum C Programming
    Replies: 3
    Last Post: February 6th, 2004, 06:50 PM
  3. Replies: 4
    Last Post: January 28th, 2004, 08:29 AM
  4. need help please
    By commodus in forum Beginner Programming
    Replies: 1
    Last Post: January 18th, 2004, 04:50 PM
  5. I don't know what this error message means
    By lcham02 in forum Java Help
    Replies: 2
    Last Post: January 13th, 2004, 11:57 AM

IMN logo majestic logo threadwatch logo seochat tools logo