Re: [PHP-DB] counting multiple columns based on different values

2002-02-16 Thread DL Neil
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

Re: [PHP-DB] counting multiple columns based on different values

2002-02-16 Thread John Hawkins
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

Re: [PHP-DB] counting multiple columns based on different values

2002-02-15 Thread John Hawkins
Ratings.Status = 2 OR Ratings.Status = 3 regards, Peter Software Engineer / Trainer Vervoorn IT - Original 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

Re: [PHP-DB] counting multiple columns based on different values

2002-02-14 Thread Peter Vervoorn
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 obvious (and easy) because this sure seems like it should

Re: [PHP-DB] counting multiple columns based on different values

2002-02-14 Thread Peter Vervoorn
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): SELECT ClientName, Count(*) FROM Clients LEFT JOIN

[PHP-DB] counting multiple columns based on different values

2002-02-13 Thread John Hawkins
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

Re: [PHP-DB] counting multiple columns based on different values

2002-02-13 Thread Jason Cox
] 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's the issue: I need to pull the client name and ID out of one table and then, count the records

Re: [PHP-DB] counting multiple columns based on different values

2002-02-13 Thread John Hawkins
- From: John Hawkins [EMAIL PROTECTED] To: php-db list [EMAIL PROTECTED] Sent: 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

Re: [PHP-DB] counting multiple columns based on different values

2002-02-13 Thread John Hawkins
!! Jason Cox - Original Message - From: John Hawkins [EMAIL PROTECTED] To: php-db list [EMAIL PROTECTED] Sent: 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

Re: [PHP-DB] counting multiple columns based on different values

2002-02-13 Thread Jason Cox
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 columns based on different values Oops. I spoke