From 2b1f68a6546b7a2743efaca2f224c1de90e17d1d Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 27 Feb 2009 00:19:12 +0000 Subject: Continue the journey of replacing raw sql with ORM or Database method calls (Ticket #68) --- modules/tag/helpers/tag_event.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/tag/helpers') diff --git a/modules/tag/helpers/tag_event.php b/modules/tag/helpers/tag_event.php index 7192edec..47391355 100644 --- a/modules/tag/helpers/tag_event.php +++ b/modules/tag/helpers/tag_event.php @@ -54,7 +54,7 @@ class tag_event_Core { "AND `id` IN (SELECT `tag_id` from `items_tags` WHERE `item_id` = $item->id)"); $db->query("DELETE FROM `tags` WHERE `count` = 0 AND `id` IN (" . "SELECT `tag_id` from `items_tags` WHERE `item_id` = $item->id)"); - $db->query("DELETE FROM `items_tags` WHERE `item_id` = $item->id;"); + $db->delete("items_tags", array("item_id" => "$item->id")); } } -- cgit v1.2.3