Re: Query OK in localhost, error on ISP server

2008-04-17 Thread contiw
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_

Re: Query OK in localhost, error on ISP server

2008-04-17 Thread contiw
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 sum(#variables.tablepre

Query OK in localhost, error on ISP server

2008-04-16 Thread contiw
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 Th

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

2008-04-09 Thread contiw
; 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()

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

help-a-new with query ...

2008-03-24 Thread contiw
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 conferenc