Hugh,
Thanks so much for the very detalied explanation. You
can bet I'll be saving it as reference for future
projects. Your solution worked perfectly!
As for the divisionID not being needed in both tables.
Ultimately, you are correct. I could easily get away
with connecting the tables
Howdy, group!
Well, I sure felt like I was on the right track with
this one, but just can't get around the last curve.
Hopefully I can explain it well enough that somebody
could help navigate...
What I'm trying to do is display a list of division
names assuming that each division has at least 2
Ah Ha! I got it. This was a clear case of RTFM...
Based on what you said, I went back and re-read page
67 of MySQL by Paul DuBouis and sure enough, it made
sense this time...
Here is what I came up with:
SELECT gamedate, gametime, divisions.name as division,
t1.name as teama, t2.name as teamb
Sorry for the lack of information in the subject line,
but I didn't know how else to explain it briefly...
Howdy, yet again...
Here's the build up...
I have 2 tables and they look like this:
table: teams
ID
leagueID
divisionID
name
table: games
ID
leagueID
divisionID
team_a
team_b
date
time
that produces the exact report I was trying
to get.
Thanks again!!
John Hawkins
--- DL Neil [EMAIL PROTECTED] wrote:
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
Peter,
I totally appreciate the extra effort on this one!
Just so you know, the results come back as two records
per client. Like this:
| ClientName | Status | Count |
| Steve | 2 | 25|
| Steve | 3 | 83|
| Gary | 2 | 12|
| Gary | 3 | 33
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
-
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
!!
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
I know I could very easily do this after doing the
initial database call simply by calculating the two
variables, but, I was wondering if there was a way to
do this during the sql statement so my results would
already have my answer...
Here's the setup. I have two tables. Table A has the
Now why didn't I try that???
Thanks for your help. Worked like a charm!
John
--- DL Neil [EMAIL PROTECTED] wrote:
John,
I know I could very easily do this after doing the
initial database call simply by calculating the
two
variables, but, I was wondering if there was a way
to
do
Hi again!
I have a MySQL table named ratings. It has 5 fields in
it like this:
ID, name, deposit, days, hands
The table has 10 rows in it with assorted data in each
field.
Here is what I would like to to:
1. Display all 10 rows of data on the page in a table
with the fields deposit, days and
Ok, I did something stupid and now I am paying the
price...
In an internal database that tracks the time and date
something happens on our site, I mistakenly forgot to
use leading zeros in the 24 hour column(s). So,
anything that happens between 1-9 am are all short by
one digit. Now, I need to
!
John Hawkins
__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED
14 matches
Mail list logo