Can I do this in one query?
yes
add location.location_name to the GROUP BY clause
;o)
� The WDVL Discussion List from WDVL.COM �
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
Send
Sadly not?
happily yes, unless you added it wrong
can i see the changed query?
� The WDVL Discussion List from WDVL.COM �
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
Send Your
Don't you want to GROUP BY the company name reather than the location
name? By definition, grouping by the location name will only return one
row per location...
the GROUP BY should include both
The WDVL Discussion List from WDVL.COM
To Join wdvltalk, Send An Email To:
On Wed, 15 Nov 2006, r937 wrote:
Don't you want to GROUP BY the company name reather than the location
name? By definition, grouping by the location name will only return one
row per location...
the GROUP BY should include both
Ah, GROUP BY company, location - of course :)
The
No, it did work.. but my trest data didn't have what I'd described..
Company x only had 4 offices in one city..
so I've added a few fake offices and it filters!
Phew!!!
cheers...
Final Query
===
SELECT company.company_id,
company.company_name,
company.website,
On Wed, 15 Nov 2006, Tris wrote:
No, it did work.. but my trest data didn't have what I'd described..
Company x only had 4 offices in one city..so I've added a few fake
offices and it filters!Phew!!!
Good stuff :)
The company_name and company_website in the GROUP BY clause seems
redundant to
this could only have come up in mysql, by the way
writing this (which is what you had) --
select a, b, c, count(*) ... group by a, b
is invalid in all other databases
you will find that in the result set, there will be one row for each
combination of a,b, but the value for c in the
On Wed, 15 Nov 2006, r937 wrote:
this could only have come up in mysql, by the way
writing this (which is what you had) --
select a, b, c, count(*) ... group by a, b
is invalid in all other databases
you will find that in the result set, there will be one row for each
combination of
If I understand right, you're saying that using an aggregating function on
a field you haven't included in the GROUP BY clause is illegal in real
databases, and unpredictable in MySQL (like most things in MySQL ;) )?
no, it isn't using an aggregating function on that is the problem
you ~can~
On Wed, 15 Nov 2006, r937 wrote:
If I understand right, you're saying that using an aggregating function on
a field you haven't included in the GROUP BY clause is illegal in real
databases, and unpredictable in MySQL (like most things in MySQL ;) )?
no, it isn't using an aggregating
Hi all,
Does anyone know how you create a form so that some text appears in the
box (for example Name) and when you click in the box, it disappears so
that your text can go there?
TIA,
Riva
The WDVL Discussion List from WDVL.COM
To Join wdvltalk, Send An Email To:
input type=text name=fieldName value=text to be removed
onclick=javascript: document.formName.fieldName.value = '';
try that...
On 15/11/06, Portman [EMAIL PROTECTED] wrote:
Hi all,
Does anyone know how you create a form so that some text appears in the
box (for example Name) and when you
Hi all,
Does anyone know how you create a form so that some text appears in the
box (for example Name) and when you click in the box, it disappears so
that your text can go there?
TIA,
Riva
The WDVL Discussion List from WDVL.COM
To Join wdvltalk, Send An Email To: mailto:[EMAIL
input type=text name=fieldName value=text to be removed
onclick=javascript: document.formName.fieldName.value = '';
try that...
On 15/11/06, Portman [EMAIL PROTECTED] wrote:
Hi all,
Does anyone know how you create a form so that some text appears in the
box (for example Name) and when you
Riva,
Try this: input type=text size=30 maxsize=100 value=Name
name=NameField onfocus=if (this.value == 'Name'){this.value = '';}
-Cheryl
Portman [EMAIL PROTECTED] wrote:
=
Hi all,
Does anyone know how you create a form so that some text appears in the
box (for example
On Wed, 15 Nov 2006, Cheryl Hewitt wrote:
Riva,
Try this: input type=text size=30 maxsize=100 value=Name
name=NameField onfocus=if (this.value == 'Name'){this.value = '';}
-Cheryl
Cheryl beat me to it - I was going to suggest only clearing the box if the
value is still the 'default'
16 matches
Mail list logo