diff options
Diffstat (limited to 'ratatoeskr')
-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. */ |