(SELECT * FROM `idents` where PhotoID = 'badc74d6-58bd-4e46-9a48-aefb3487a61d' AND Selected = 'Yes' ORDER BY IdentTime desc LIMIT 1) UNION ALL (SELECT * FROM `idents` where PhotoID = 'badc74d6-58bd-4e46-9a48-aefb3487a61d' AND Author = 'devtest' ORDER BY IdentTime desc limit 1)
两边的语句加上括号就可以了