Current File : /home/users/barii/public_html/finansenl.com.pl/wodki/application/classes/Model/wall/comment.php
<?php defined('SYSPATH') or die('No direct access allowed.');

class Model_Wall_Comment extends ORM {

   protected $_belongs_to = array('user' => array(), 'wall' => array());
   


   static public function getCountUser( $blog_id, $user_id ) {
   
		$comment = ORM::Factory('wall_comment')->where('user_id','=', $user_id)->where('blog_id','=',$blog_id)->find_all();
		return $comment->count();
   
   }
   
    static public function getCount( $blog_id ) {
   
		$comment = ORM::Factory('wall_comment')->where('blog_id','=',$blog_id)->find_all();
		return $comment->count();
   
   }
   
    static public function getUsername( $user_id ) {
   
		$user = ORM::Factory('user', $user_id);
		return $user->username;
   
   }
}