heres my query which isnt working:
$query = 'select (select OnlineServiceId from OnlineService o where o.AccountId='.$accountid.') as oid, d.name from domainalias d where d.DomainId=oid';
basically i need todo this:
1) From table 'onlineservice' grab the 'onlineserviceid' that correlates to field 'accountid' which i pass as $accountid
2) using 'onlineserviceid' grab every record from table 'domainalias' where 'domainid' in that table matches 'onlinelineserviceid' from the previous table...
i think i might need to use an inner join, but I'm no good at these complex sql queries
any help is appreciated!