SELECT spider.* FROM spider WHERE spider.active = 'Y' AND spider.ter_id = ?