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`

Reply via email to