Пример #1
0
 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;
    }