i want to fetch the count from three different table which is not related. for which i am using this SQL query.
SELECT
(SELECT COUNT(DISTINCT id) FROM user) AS userCount,
(SELECT COUNT(DISTINCT id) FROM item) AS itemCount,
(SELECT COUNT(DISTINCT id) FROM sub_category) as categoryCount;
Is it possible to use DQL for the above query? or do i have to use rawSQL query?
I am using doctrine 1.2.4
After digging around i found the solution by myself. i.e by directly using the pdo connection instance.
while this works for me as of now. i was still wondering if it was possible to convert it into DQL. i tried different syntaxes and approaches like Doctrine’s RAW SQL but couldn’t get it to work.