Results 1 to 8 of 8

Thread: MySql DB error

  1. #1
    Join Date
    Oct 2004
    Location
    Ohio
    Posts
    1,668

    MySql DB error

    Hello, I recently purchased an image hosting script and now I am getting errors with the db and I am not an expert. The issue pops up when I upload an image.
    It says that the image is uploaded, but at the bottom of the upload page, I get the following error;

    Database error with function: Set Image File Size
    SQL: UPDATE images SET filesize= WHERE image_id=3
    mySQL Says: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE image_id=3' at line 1

    I have no idea what might be causing this or how to fix it. If any of you can offer advice on how to fix it, or if you know you can fix it let me know.
      0 Not allowed!

  2. #2
    Join Date
    Nov 2005
    Posts
    123
    From looking at your error message, it seems the filesize column is not getting a value. Check the code that constructs the query string.
      0 Not allowed!

  3. #3
    Join Date
    Jul 2002
    Location
    Victoria, Australia
    Posts
    36,941
    Moved to employment by request.
      0 Not allowed!

  4. #4
    Join Date
    Oct 2004
    Location
    Ohio
    Posts
    1,668
    Thanks, Mouse!


    If anyone thinks they can help me, give me a quote.
      0 Not allowed!

  5. #5
    Join Date
    Dec 2002
    Location
    chica go go
    Posts
    11,876
    It sounds like the server is having interpreting the value that is supposed to be sent with the filesize value in your query.

    What script are you using? Did you run into any php errors?

    I think your host might be disabling use of system(), and the script might be using system() to somehow find the size of the image.
      0 Not allowed!

  6. #6
    Join Date
    Oct 2004
    Location
    Ohio
    Posts
    1,668
    Hey Mike, I am the only person on the server and no functions are disabled.
    The script is PHP Image Host. No php errors.
      0 Not allowed!

  7. #7
    Join Date
    Dec 2002
    Location
    chica go go
    Posts
    11,876
    I might be able to figure it out. Contact me via aim, or msn and I'll see if I can figure out what's wrong with it.
      0 Not allowed!

  8. #8
    Join Date
    Oct 2004
    Location
    Ohio
    Posts
    1,668
    Problem has been solved. Mods please close this thread.
      0 Not allowed!

Posting Permissions

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