I want to only return a row if either of the subquery returns a field.
SELECT upd8r_user_accts.id, (
SELECT fb_id
FROM upd8r_facebook_accts
WHERE user_id = upd8r_user_accts.id
) as facebook, (
SELECT twitter
FROM upd8r_twitter_accts
WHERE user_id = upd8r_user_accts.id
) as twitter
FROM `upd8r_user_accts`
also i am returning id/access token values for each of the subqueries- how could i return a boolean value of yes or no?
1 Answer