Your IP : 216.73.217.64


Current Path : /home3/gp97/tbfmobile.97gp.net/app/sae/modules/Topic/Model/Db/Table/
Upload File :
Current File : //home3/gp97/tbfmobile.97gp.net/app/sae/modules/Topic/Model/Db/Table/Subscription.php

<?php

class Topic_Model_Db_Table_Subscription extends Core_Model_Db_Table {

    protected $_name    = "topic_subscription";
    protected $_primary = "subscription_id";

    public function isSubscribed($category_id,$device_uid) {
        $select = $this->select()
            ->from(array('pcs' => $this->_name))
            ->where('pcs.category_id = ?', $category_id)
            ->where('pcs.device_uid = ?', $device_uid)
        ;

        return $this->fetchAll($select);
    }

    public function findAllowedCategories($device_uid) {
        $select = $this->select()
            ->from(array('pcs' => $this->_name))
            ->where('pcs.device_uid = ?', $device_uid)
        ;
        return $this->fetchAll($select);
    }
}