kods evolucionē!
ja senāk rakstīju:
SELECT obj13_gallery.*
FROM relations, obj13_gallery
WHERE relations.obj1_type_id = 4 AND
relations.obj1_id = $itemId AND
relations.obj2_type_id = 13 AND
relations.obj2_id = obj4_gallery.id
tad tagad rakstu:
SELECT mod_gallery.*
FROM root_relations, mod_gallery
WHERE root_relations.module1 = 'mod_news' AND
root_relations.item1 = $itemId AND
root_relations.module2 = 'mod_gallery' AND
root_relations.item2 = mod_gallery.id
grūti pateikt, vai uz labo pusi, taču citādāk ir :)