Hi all,
Consider the following (My)SQL query I'm using:
The red marked sub-queries are identical, and I was wondering whether there is a way to only have the sub-query run once?Code:SELECT * FROM `PageRelations` WHERE `ancestor` IN ( SELECT `descendant` FROM `PageRelations` WHERE `ancestor` = 1 ) OR `descendant` IN ( SELECT `descendant` FROM `PageRelations` WHERE `ancestor` = 1 )
Thanks![]()


Reply With Quote
