From 03f9731a52639fdac018e7e8bc59c243e97b0eb9 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Wed, 9 Nov 2011 23:26:19 +0100 Subject: Fixed two SQL-Queries in models.php. --- ratatoeskr/sys/models.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ratatoeskr') diff --git a/ratatoeskr/sys/models.php b/ratatoeskr/sys/models.php index 59517a9..3f0f0e6 100644 --- a/ratatoeskr/sys/models.php +++ b/ratatoeskr/sys/models.php @@ -1496,7 +1496,7 @@ class Tag throw new AlreadyExistsError(); $this->title->save(); - qdb("UPDATE `PREFIX_tags` SET `name` = '%s', `title` = %d` WHERE `id` = %d", + qdb("UPDATE `PREFIX_tags` SET `name` = '%s', `title` = %d WHERE `id` = %d", $this->name, $this->title->get_id(), $this->id); } @@ -1903,7 +1903,7 @@ class Article */ public function save() { - $result = qdb("SELECT COUNT(*) AS `n` FROM `PREFIX_article` WHERE `urlname` = '%s' AND `id` != %d", $this->urlname, $this->id); + $result = qdb("SELECT COUNT(*) AS `n` FROM `PREFIX_articles` WHERE `urlname` = '%s' AND `id` != %d", $this->urlname, $this->id); $sqlrow = mysql_fetch_assoc($result); if($sqlrow["n"] > 0) throw new AlreadyExistsError(); -- cgit v1.2.3-54-g00ecf