I'm trying to do a query on the following table:
CREATE TABLE `filter_index` (
`fid` SMALLINT(5) UNSIGNED NOT NULL,
`link_id` INT(10) UNSIGNED NOT NULL,
PRIMARY KEY (`fid`,`link_id`)
) ENGINE=MYISAM DEFAULT CHARSET=latin1
It's a many 2 many table - about 6 million rows - fid range is about 650.
Now, the query I'm hoping to do is to lookup an fid (say 20) and return all fid's of which had link_id's associated with the fid 20.
Think of it as 'Ok, now you've picked filter option 20, here's the rest of the filter options available to you from the remaining pool'
Experimental, if there's a smarter way to do this, I'm all ears :)