The limits of ORMs in PHP
(written by Lawrence Krubner, however indented passages are often quotes)
I’m adding a new page to WP Questions to show “Good Citizens”, that is, experts who vote. You can see the query I wrote below. I wrote this and it occurred to me there is no ORM in PHP that could handle this. The site is built using Symfony and Propel, but I would not want to handle this with Propel.
SourceSELECT count(vote) as voteTotal, sf_guard_user.*, sf_guard_user_profile.*, question.subject
FROM vote
JOIN sf_guard_user on vote.user_id_casting_vote=sf_guard_user.id
JOIN sf_guard_user_profile on sf_guard_user.id=sf_guard_user_profile.user_id
AND sf_guard_user_profile.user_id=vote.user_id_casting_vote
LEFT JOIN question on vote.question_id = question.id
WHERE vote.user_id_casting_vote != question.user_id
AND sf_guard_user.is_super_admin != 1
AND vote.created_at > ‘$oneMonthAgo’
GROUP BY vote.user_id_casting_vote
HAVING voteTotal > 2
ORDER BY voteTotal desc
May 17, 2012 2:06 am
From free cell phone ringtones on MySql Workbench is a total waste of time
"I like it so much, http://dailybooth.com/freecellphoneringto free cell phone ringtones, jsneke,..."