Error while deleting image from admin tool bar

While viewing my gallery, I wanted to delete an image, I clicked the admin button upper right corner and Delete image:

`
Zenphoto Error
MySQL Query ( DELETE FROM commentsWHERE type IN ("images","_images","textobjects","videos"' AND ownerid=17 ) failed. Error: 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 '' AND ownerid=17' at line 1

Backtrace:

in query (class-image.php [505])
in _Image->deleteImage (admin-edit.php [114])
`
version 1.2.3 [3475]

Comments

  • acrylian Administrator, Developer
    Try the nightly, if I remember correctly that has been fixed.
  • I deleted zp-core, deleted files in root directory
    uplaoded zenphoto, uploaded zenpage, installed both (via webpage), when going to the index page, it shows this stupid old error again:

    `
    Zenphoto Error
    MySQL Query ( SELECT COUNT(*) FROM `comments` WHERE `type`='news' AND `inmoderation`=0 AND `private`=0 AND `ownerid`= ) failed. Error: 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 '' at line 1

    Backtrace:

    in query (functions-db.php [101])
    in query_single_row (zenpage-class-news.php [716])
    in ZenpageNews->getCommentCount (template-functions.php [2766])
    in getCommentCount (index.php [51])
    in include (index.php [116])
    ``
  • acrylian Administrator, Developer
    Did you try the nightly?
  • Yes I tried the nightly, my previous post is what happened when i used the nightly...
  • BUMP

    Okay im starting to get angry...
    I deleted everything, backed the DB up, deleted everything except /backup/ and /album/ and re-installed everything, i had some problems along the way as the installs didnt work, i had to manually navigate to them. Anyways I get the same problem!

    `
    Zenphoto Error
    MySQL Query ( SELECT COUNT(*) FROM zp_comments WHERE type='news' AND inmoderation=0 AND private=0 AND ownerid= ) failed. Error: 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 '' at line 1

    Backtrace:

    in query (functions-db.php [101])
    in query_single_row (zenpage-class-news.php [716])
    in ZenpageNews->getCommentCount (template-functions.php [2766])
    in getCommentCount (index.php [51])
    in include (index.php [116])
    `
  • Update: I deleted the old DB and didnt use it, zenphoto and zenpage created new tables and everything seems to work fine...
  • acrylian Administrator, Developer
    I have no idea what went wrong here. I did see that error before but it just happend occasionally without "clear reason".
Sign In or Register to comment.