ZenphotoCMS Forum
MySql error when deleting an album - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: MySql error when deleting an album (/thread-4677.html)



MySql error when deleting an album - igwk - 2009-02-12

I get a mysql error when I try to delete an album. I'm using the nightly build version 3454.

Here are the steps that I followed to reproduce the problem:

  • Click on the edit tab
  • Click on the delete icon for an album
  • Confirm by clicking "OK" on the two confirmation dialogs

This results in the following error message:

Zenphoto Error
MySQL Query ( DELETE FROM zp_commentsWHERE type IN ("images","_images"') AND ownerid=24 ) 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=24' at line 1

Backtrace:

in query (class-image.php [505])
in _Image->deleteImage (class-album.php [893])
in Album->deleteAlbum (admin-edit.php [306])

I took a look at the source code but it's not immediately obvious to me how to fix this. Anyone have any ideas?




MySql error when deleting an album - igwk - 2009-02-12

Actually, I think I worked around the issue by manually deleting the album directory in zenphoto/albums/, then purged the cache and refreshed the database on the Overview tab.




MySql error when deleting an album - sbillard - 2009-02-12

Looks like a typo in the code. We will get a fix into tonight's build.