<?php
/**
 * PageTable
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 */
class PageTable extends Doctrine_Table
{
    /**
     * Returns an instance of this class.
     *
     * @return object PageTable
     */
    public static function getInstance()
    {
        return Doctrine_Core::getTable('Page');
    }
	
	 public static function getPages($category_id)
    {
	
	
	
        $q = Doctrine_Query::create()->from('Page n')->leftJoin('n.Category c')->where('n.id<>?',0)->andWhere('c.is_visible=?',$category_id);

		
        return $q->execute();
    }
	
	 public static function getOrganization($category_id)
    {
	
	
	
        $q = Doctrine_Query::create()->from('Page n')->where('n.id<>?',0)->andWhere('n.is_visible=?',$category_id);

		
        return $q->execute();
    }
	
}