Hi , i want to model a simple db for user with a social network. Cold anyone
help me?
Thanks!
thank you for explaining this to me Amit. It works. Ron
The Verse of the Day
“Encouragement from God’s Word”
http://www.TheVerseOfTheDay.info
From: Amit Tandon
Sent: Friday, May 06, 2011 5:49 AM
To: Ron Piggott
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] COUNT and OUTER JOIN results
D
Dear Ron
Take your condition to ON cluause. So your on clause (for LEFT JOIN) would
read something like
ON `prayer_request_category`.`
reference` = `prayer_requests`.`prayer_request_category_reference`
AND
`prayer_requests`.`approval_
level` IN ( 1, 3 )
`prayer_requests`.`prayer_request_type` =
The following query returns all 8 prayer request categories with the total #
of requests every submitted to each category:
SELECT `prayer_request_category`.`reference` ,
`prayer_request_category`.`category` , COUNT(
`prayer_requests`.`reference` ) AS category_request_count
FROM `prayer_reques