50 users online (0 members and 50 guests)  


  Results 1 to 3 of 3

Related

  1. Replies: 1
  2. mysql fetch array error please help    Forum: PHP Forum
    Replies: 10
  3. How to fetch an image from the internet?    Forum: CGI Perl Forum
    Replies: 3
  4. fetch array problems    Forum: PHP Forum
    Replies: 4
  5. php - fetch array error    Forum: PHP Forum
    Replies: 4
  1. #1
    GO070's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2007
    Posts
    2

    Need help with MySQL fetch

    Hello everyone, I keep on getting the same error, can someone please help me..

    I'm trying to fix a game: www .game.gameoverrecords . nl

    and at some subject I get fetch errors

    Example:
    Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /storage/mijndomein/users/057290/public/sites/www.game.gameoverrecords.nl/best/brain/server.php on line 67

    This is in the server.php
    line 67:
    Code:
    while($tard=mysql_fetch_object($drop)){
    
    
    //// drop *********
    
    $drop=mysql_query("SELECT bjowner FROM bj");
    
    while($tard=mysql_fetch_object($drop)){
    
    $per=mysql_fetch_object(mysql_query("SELECT status FROM users WHERE username='$tard->bjowner'"));
    
    if($per->status == "Dead" || $per->status == "Banned"){
    
    mysql_query("UPDATE bj SET bjowner='0' WHERE bjowner='$tard->bjowner'");
    
    }}
    


    Hopefully someone can help me with this, much thanks
    Last edited by vinyl-junkie; 12-30-2007 at 10:56 AM. Reason: Added code tags

  2. #2
    GO070's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2007
    Posts
    2

    Re: Need help with MySQL fetch

    Ow thats the wrong link the link is:

    www . game . gameoverrecords.nl/best

  3. #3
    skym's Avatar
    New User

    Status
    Offline
    Join Date
    Jan 2008
    Location
    Oradea, Romania
    Posts
    10

    Re: Need help with MySQL fetch

    The first line in your code is line 67?
    See where $drop is defined. I guess is the result of a mysql query which went wrong. Try to see what's wrong in the query with something like:

    $result = mysql_query("SELECT * FROM mytable") or die('mysql error: ' . mysql_error());

    You can use mysql_error() with most of the mysql functions, even mysql_connect().



Tags for this Thread