ZF2 - Unterabfragen
Unterabfrage in Zend Framework 2
Meine gewünschte Anfrage:
SELECT `comment`.`id` AS `commentId`, `comment`.`comment` AS `comment`,
(SELECT COUNT(`comment_vote`.`id`) AS `negativeVote`
FROM `comment_vote`
WHERE vote = -1
AND `comment_vote`.`commentId` = `comment`.`id`) AS `nagetiveVoteCount`
FROM `comment`
Bitte helfen Sie.
Danke, Anjith