示例#1
0
文件: Index.php 项目: nburka/blorg
 protected function getWhereClause()
 {
     if ($this->where_clause === null) {
         $where = parent::getWhereClause();
         $instance_id = $this->app->getInstanceId();
         $where .= sprintf(' and post in (select id from BlorgPost where instance %s %s)', SwatDB::equalityOperator($instance_id), $this->app->db->quote($instance_id, 'integer'));
         $this->where_clause = $where;
     }
     return $this->where_clause;
 }
示例#2
0
    protected function getWhereClause()
    {
        if ($this->where_clause === null) {
            $where = parent::getWhereClause();
            $instance_id = $this->app->getInstanceId();
            $where .= sprintf(' and photo in (select PinholePhoto.id from PinholePhoto
					inner join ImageSet on ImageSet.id = PinholePhoto.image_set
					where instance %s %s)', SwatDB::equalityOperator($instance_id), $this->app->db->quote($instance_id, 'integer'));
            $this->where_clause = $where;
        }
        return $this->where_clause;
    }