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
I am using the exact same database both in local and server.
Running MySQL 5 in localhost and supposedly versions 4 and 5 sopported by the ISP server.
Thanks for helping
count(distinct forums.id)-1 as schools,
count(distinct threads.id) as topics,
count(distinct messages.id) as msgs,
sum(distinct threads.views) as views,
((count(distinct messages.id) *2) +sum(distinct threads.views) ) as activity,
0 as hBarLength
left JOIN forums ON conferences.id = forums.conferenceidfk)
left JOIN threads ONforums.id = threads.forumidfk and threads.author <> ‘admin’)
left JOIN messages ON threads.id = messages.threadidfk and messages.author <> ‘admin’
GROUP BY conferences.id