Need PHP help!

Discussion in 'Programming' started by LegendaryPosting, Jul 21, 2007.

  1. #1
    I am creating an uploading script for my site. I am coming up with a fetch error

    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/upload/public_html/index.php on line 241

    It can also be viewed at http://www.uploadimagez.com If you can help that would be great maybe even a donation to paypal will be sent!
     
    LegendaryPosting, Jul 21, 2007 IP
  2. amf-flt

    amf-flt Active Member

    Messages:
    100
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    58
    #2
    Would need at least the snippet of code above and including the mysql_fetch_assoc to see what's going on. The variable passed to mysql_fetch_assoc needs to be the result variable from a mysql_query.

    WAG: the query failed and mysql_fetch_assoc is being passed false instead of a resultset. Check the query and the result set value to see if this is a good guess.
     
    amf-flt, Jul 21, 2007 IP
  3. madarcu

    madarcu Peon

    Messages:
    48
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    if you still need help I can do it, but you need to give me more informations
     
    madarcu, Jul 22, 2007 IP
  4. aRo`

    aRo` Peon

    Messages:
    141
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    this error mostly occurs when you have an error in your SQL statement.

    Can you print the query ?
     
    aRo`, Jul 23, 2007 IP
  5. it career

    it career Notable Member

    Messages:
    3,562
    Likes Received:
    155
    Best Answers:
    0
    Trophy Points:
    270
    #5
    Can you please post the line which is giving the error? There is a working uploading script in PHP at w3schools.com
     
    it career, Jul 23, 2007 IP
  6. LegendaryPosting

    LegendaryPosting Peon

    Messages:
    711
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I have fixed the error thanks for the help tho!
     
    LegendaryPosting, Jul 23, 2007 IP