SkyPHP/skyphp — Issue #28: subquery in aql
Author: jag6030
Created: 2012-03-07 23:11:56+00:00
State: open

$aql = "mls_hood {
id,
name as hood_name,
description,
county,
state,
type,
households,
slug
where mls_hood.on_website = 1
and id in (SELECT mls_hood_id FROM market_hood WHERE market_hood.market_id = 1)
and feature = 1
order by random()
limit 1
}";
$rs = aql::select($aql);

the subquery sql is wrong...

FROM mls_hood.market_hood