Complementing the post above:
I have found that SUM(DISTINCT xxx) is valid with v.5x, not so in v.4x.
While I am trying to convince my ISP to switch the database to a v.5x
server, I would like some help with a workaround - please excuse my
newbness. I have tried :
(select
conti
contiw wrote:
The following query run flawlessly in localhost but produces error on ISP
server:
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 'distinct
sf_threads.views) as views, ((count
The following query run flawlessly in localhost but produces error on ISP
server:
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 'distinct
sf_threads.views) as views, ((count(distinct sf_messages.' at line 6
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)
= 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
select distinct
threads.id,
threads.name,
threads.readonly,
threads.active,
threads.forumidfk,
threads.useridfk,
threads.author,
threads.datecreated,
forums.name as forum,
threads.author as username,
threads.sticky,
threads.views,
conferences.name as conference,
conferences.id as