I have spent the last five hours trying to get every product option combination from a table but I'm totally stuck now. I have a table with data like (simplified):
CREATE TABLE `assigned_options` (
`option_id` int(10) unsigned NOT NULL DEFAULT '0',
`value_id` int(10) unsigned NOT NULL DEFAULT '0',
);
INSERT INTO `assigned_options` (`value_id`, `option_id`) VALUES
(4, 2),
(3, 2),
(2, 1),
(1, 1),
(5, 3),
(6, 3),
(7, 3);
Say option ID 2 is color with variations red (4) and blue (3), option id 1 size etc....
Is it possible to do this with one MySQL query? I have tried using PHP to make a recurring function to get every possibility but I just can't get it to work.
Any tips GREATLY appreciated. :)