Login   Register  
PHP Classes
elePHPant
Icontem

File: punFramework/models/news.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 7 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");
    }
}