I\'d like to execute something like this on my MySQL server:
SET @id=(SELECT id FROM lookupTable WHERE field=?); (SELECT * FROM table2 WHERE id=@id) UNION (S
Just running this as two separate queries (within one connection) should give you same results.