aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2011-11-09 23:26:19 +0100
committerKevin Chabowski <kevin@kch42.de>2011-11-09 23:26:19 +0100
commit03f9731a52639fdac018e7e8bc59c243e97b0eb9 (patch)
tree0f4b60ee09e17f31315da83b3fc30cee26c86508
parenta3df379d8779d3d0730e01645bd6e6d7ad8b40b9 (diff)
downloadratatoeskr-cms-03f9731a52639fdac018e7e8bc59c243e97b0eb9.tar.gz
ratatoeskr-cms-03f9731a52639fdac018e7e8bc59c243e97b0eb9.tar.bz2
ratatoeskr-cms-03f9731a52639fdac018e7e8bc59c243e97b0eb9.zip
Fixed two SQL-Queries in models.php.
-rw-r--r--ratatoeskr/sys/models.php4
1 files changed, 2 insertions, 2 deletions
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();