deletion of rate lines when deleting an element

git-svn-id: http://piwigo.org/svn/trunk@523 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
z0rglub
2004-09-18 16:05:15 +00:00
parent 01d3587006
commit 79de56d63c
+8
View File
@@ -297,6 +297,14 @@ DELETE FROM '.IMAGE_CATEGORY_TABLE.'
DELETE FROM '.FAVORITES_TABLE.'
WHERE image_id IN (
'.wordwrap(implode(', ', $ids), 80, "\n").')
;';
mysql_query($query);
// destruction of the rates associated to this element
$query = '
DELETE FROM '.RATE_TABLE.'
WHERE element_id IN (
'.wordwrap(implode(', ', $ids), 80, "\n").')
;';
mysql_query($query);