diff options
author | Kevin Chabowski <kevin@kch42.de> | 2011-11-16 22:42:00 +0100 |
---|---|---|
committer | Kevin Chabowski <kevin@kch42.de> | 2011-11-16 22:42:00 +0100 |
commit | e62ddc934464ca5fcd967f5c7ee6681e78c4b696 (patch) | |
tree | 755f673c4d97398db801367e34a54c11dd67eff7 | |
parent | b44559ac28ed57ee3f1c31e2406b4de59b91011b (diff) | |
download | ratatoeskr-cms-e62ddc934464ca5fcd967f5c7ee6681e78c4b696.tar.gz ratatoeskr-cms-e62ddc934464ca5fcd967f5c7ee6681e78c4b696.tar.bz2 ratatoeskr-cms-e62ddc934464ca5fcd967f5c7ee6681e78c4b696.zip |
Added Comment::all().
-rw-r--r-- | ratatoeskr/sys/models.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ratatoeskr/sys/models.php b/ratatoeskr/sys/models.php index b2f8982..9cfd80c 100644 --- a/ratatoeskr/sys/models.php +++ b/ratatoeskr/sys/models.php @@ -911,6 +911,22 @@ class Comment } /* + * Constructor: all + * Get all comments + * + * Returns: + * Array of Comment objects + */ + public static function all() + { + $rv = array(); + $result = qdb("SELECT `id` FROM `PREFIX_comments` WHERE 1"); + while($sqlrow = mysql_fetch_assoc($result)) + $rv[] = self::by_id($sqlrow["id"]); + return $rv; + } + + /* * Function: save * Save changes to database. */ |