select count(). Help-a-newb

2008-04-09 Thread contiw

Is it possible to get the count() for forums, threads and messages
extrapolating from the following query? Thanx for helping a newb. 

select 
sf_conferences.id, 
sf_conferences.name 
from 
((#variables.tableprefix#conferences 
left JOIN sf_forums ON sf_conferences.id=sf_forums.conferenceidfk) 
left JOIN sf_threads ON sf_forums.id = sf_threads.forumidfk) 
left JOIN sf_messages ON sf_threads.id = sf_messages.threadidfk 
GROUP BY 
sf_conferences.id, 
sf_conferences.name
-- 
View this message in context: 
http://www.nabble.com/select-count%28%29.-Help-a-newb-tp16582786p16582786.html
Sent from the MySQL - General mailing list archive at Nabble.com.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: select count(). Help-a-newb

2008-04-09 Thread Richard

Hi I think you would do this :

SELECT
sf_conferences.id,
sf_conferences.name,
count(*) AS `count`
FROM
((
LEFT JOIN sf_forums ON sf_conferences.id=sf_forums.conferenceidfk)
LEFT sf_threads ON sf_forums.id = sf_threads.forumidfk)
LEFT JOIN sf_messages ON sf_threads.id = sf_messages.threadidfk
GROUP BY
sf_conferences.id,
sf_conferences.name;

I hope this is what you want :)

contiw a écrit :

Is it possible to get the count() for forums, threads and messages
extrapolating from the following query? Thanx for helping a newb. 

select 
sf_conferences.id, 
sf_conferences.name 
from 
((#variables.tableprefix#conferences 
left JOIN sf_forums ON sf_conferences.id=sf_forums.conferenceidfk) 
left JOIN sf_threads ON sf_forums.id = sf_threads.forumidfk) 
left JOIN sf_messages ON sf_threads.id = sf_messages.threadidfk 
GROUP BY 
sf_conferences.id, 
sf_conferences.name



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: select count(). Help-a-newb

2008-04-09 Thread contiw

Thank You Richard! Merci beaucoup.
wConti


Richard-175 wrote:
 
 Hi I think you would do this :
 
 SELECT
 sf_conferences.id,
 sf_conferences.name,
 count(*) AS `count`
 FROM
 ((
 LEFT JOIN sf_forums ON sf_conferences.id=sf_forums.conferenceidfk)
 LEFT sf_threads ON sf_forums.id = sf_threads.forumidfk)
 LEFT JOIN sf_messages ON sf_threads.id = sf_messages.threadidfk
 GROUP BY
 sf_conferences.id,
 sf_conferences.name;
 
 I hope this is what you want :)
 
 contiw a écrit :
 Is it possible to get the count() for forums, threads and messages
 extrapolating from the following query? Thanx for helping a newb. 
 
 select 
 sf_conferences.id, 
 sf_conferences.name 
 from 
 ((#variables.tableprefix#conferences 
 left JOIN sf_forums ON sf_conferences.id=sf_forums.conferenceidfk) 
 left JOIN sf_threads ON sf_forums.id = sf_threads.forumidfk) 
 left JOIN sf_messages ON sf_threads.id = sf_messages.threadidfk 
 GROUP BY 
 sf_conferences.id, 
 sf_conferences.name
 
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/select-count%28%29.-Help-a-newb-tp16582786p16590541.html
Sent from the MySQL - General mailing list archive at Nabble.com.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]