PHP Classes

File: punFramework/models/news.php

Recommend this page to a friend!
  Classes of Piotr Malinski   punFramework   punFramework/models/news.php   Download  
File: punFramework/models/news.php
Role: Example script
Content type: text/plain
Description: news example - model
Class: punFramework
MVC framework to extend punBB discussion boards
Author: By
Last change:
Date: 17 years ago
Size: 280 bytes
 

Contents

Class file image Download
<?PHP
class news extends punRoot
{
public function
get_latest_news()
    {
    return
news::query("SELECT * FROM ".$this->db->prefix."topics AS t LEFT JOIN ".$this->db->prefix."posts AS p ON t.id = p.topic_id WHERE t.forum_id = '1' GROUP BY t.id ORDER BY t.posted DESC LIMIT 10");
    }
}