Полезные решения, шпаргалки и примеры по html, css, js, jQuery, MySQL, PHP, HostCMS, ssh.
SELECT `shop_items`.*
FROM `shop_items`
JOIN `shop_groups` ON `shop_groups``.id` = `shop_items`.`shop_group_id`
AND (`shop_groups`.`parent_id` IN (1,2) OR `shop_groups`.`id` IN (1,2))
WHERE `shop_items`.`shortcut_id` = 0 AND `shop_items`.`modification_id` = 0