select()->where('table.contents.type = ? AND (table.contents.parent = 0 OR table.contents.parent IS NULL)', 'attachment'); /** 加上对用户的判断 */ $this->where('table.contents.authorId = ?', $this->user->uid); /** 提交查询 */ $select->order('table.contents.created', Typecho_Db::SORT_DESC); $this->db->fetchAll($select, array($this, 'push')); } }