John,
Don't tell me I asked you to do a SUM() without a GROUP BY clause!!!??? Someone pass
me a hammer!
- guess I was so focused on getting around that incompatible pair of GROUP BYs in the
first attempt. It is so
much easier when I can 'play' with the data in MySQL-Front to 'debug'!
Rather th
DL,
I ran the query exactly as you had sent it and ran
into the same error where it talked about mixing
counts without a group clause. So, I added a quick
"group by clientname" and ran it again
One word "PERFECTION".
I can't thank you enough. This is now a blistering
fast query that pro
John,
> > I'm gonna go out on a limb and guess that I'm missing
> > something obvious (and easy) because this sure seems
> > like it should be able to be done.
> >
> > Here's the issue: I need to pull the client name and
> > ID out of one table and then, count the records in a
> > different table
]>
>Sent: Thursday, February 14, 2002 9:36 AM
>Subject: Re: [PHP-DB] counting multiple columns based
on different
>values
>
>
>> This should do the trick (untested):
>>
>> SELECT ClientName, Count(*) FROM Clients LEFT JOIN
Ratings ON
>Clients.ID =
>>
Message -
From: "Peter Vervoorn" <[EMAIL PROTECTED]>
To: "php-db list" <[EMAIL PROTECTED]>
Sent: Thursday, February 14, 2002 9:36 AM
Subject: Re: [PHP-DB] counting multiple columns based on different values
> This should do the trick (untested):
>
>
John,
> I'm gonna go out on a limb and guess that I'm missing
> something obvious (and easy) because this sure seems
> like it should be able to be done.
>
> Here's the issue: I need to pull the client name and
> ID out of one table and then, count the records in a
> different table (called ratin
;John Hawkins" <[EMAIL PROTECTED]>
To: "php-db list" <[EMAIL PROTECTED]>
Sent: Thursday, February 14, 2002 3:11 AM
Subject: [PHP-DB] counting multiple columns based on different values
> I'm gonna go out on a limb and guess that I'm missing
> something o
be a better way but it
doesn't.
Jason Cox
- Original Message -
From: "John Hawkins" <[EMAIL PROTECTED]>
To: "Jason Cox" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, February 13, 2002 9:08 PM
Subject: Re: [PHP-DB] counting multiple
AND
> ratings3.status = '3'
> GROUP BY clients.clientname;
>
> That should do the trick. Enjoy!!
>
> Jason Cox
>
> - Original Message -
> From: "John Hawkins" <[EMAIL PROTECTED]>
> To: "php-db list" <[EMAIL PROTECTED]&
s.clientname;
>
> That should do the trick. Enjoy!!
>
> Jason Cox
>
> - Original Message -
> From: "John Hawkins" <[EMAIL PROTECTED]>
> To: "php-db list" <[EMAIL PROTECTED]>
> Sent: Wednesday, February 13, 2002 7:11 PM
> Subject
: Wednesday, February 13, 2002 7:11 PM
Subject: [PHP-DB] counting multiple columns based on different values
> I'm gonna go out on a limb and guess that I'm missing
> something obvious (and easy) because this sure seems
> like it should be able to be done.
>
> Here
I'm gonna go out on a limb and guess that I'm missing
something obvious (and easy) because this sure seems
like it should be able to be done.
Here's the issue: I need to pull the client name and
ID out of one table and then, count the records in a
different table (called ratings) that match two
d
12 matches
Mail list logo