I accidentally sent it before finishing...
I am looking for a way to do the following with a single query:
> SELECT `ID`, `Name`, `Interface`,
> (SELECT count(*) FROM CONCAT('listings_', `ID`) WHERE `Status`='Active') as
> `activeListings`
> FROM `sites`
>
I am querying the sites table and I want
I am looking for a way to do the following with a single query:
SELECT `ID`, `Name`, `Interface`,
(select count(*) FROM CONCAT('listings_', `ID`) WHERE `Status`='Active') as
`activeListings`
FROM `sites`