Example #1
0
 public function get_articles()
 {
     $rv = array();
     $stmt = qdb("SELECT `a`.`id` AS `id`, `a`.`urlname` AS `urlname`, `a`.`title` AS `title`, `a`.`text` AS `text`, `a`.`excerpt` AS `excerpt`, `a`.`meta` AS `meta`, `a`.`custom` AS `custom`, `a`.`article_image` AS `article_image`, `a`.`status` AS `status`, `a`.`section` AS `section`, `a`.`timestamp` AS `timestamp`, `a`.`allow_comments` AS `allow_comments`\nFROM `PREFIX_articles` `a`\nINNER JOIN `PREFIX_article_tag_relations` `b` ON `a`.`id` = `b`.`article`\nWHERE `b`.`tag` = ?", $this->id);
     while ($sqlrow = $stmt->fetch()) {
         $rv[] = Article::by_sqlrow($sqlrow);
     }
     return $rv;
 }