From ad56995bafffeca89c44b07cb4f25da7b36a1a99 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sat, 28 Feb 2009 03:34:03 +0000 Subject: Correct a type and missed a table name --- modules/tag/helpers/tag_event.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/tag/helpers/tag_event.php b/modules/tag/helpers/tag_event.php index a0c7b159..5604cb50 100644 --- a/modules/tag/helpers/tag_event.php +++ b/modules/tag/helpers/tag_event.php @@ -52,7 +52,7 @@ class tag_event_Core { $db = Database::instance(); $db->query("UPDATE `[tags]` SET `count` = `count` - 1 WHERE `count` > 0 " . "AND `id` IN (SELECT `tag_id` from `[items_tags]` WHERE `item_id` = $item->id)"); - $dbs->query("DELETE FROM `tags` WHERE `count` = 0 AND `id` IN (" . + $db->query("DELETE FROM `[tags]` WHERE `count` = 0 AND `id` IN (" . "SELECT `tag_id` from `[items_tags]` WHERE `item_id` = $item->id)"); $db->delete("items_tags", array("item_id" => "$item->id")); } -- cgit v1.2.3