[PHP-DB] Re: An interesting query that needs a different pair of eyes

2002-03-12 Thread John Hawkins
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

[PHP-DB] An interesting query that needs a different pair of eyes

2002-03-11 Thread John Hawkins
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

Re: [PHP-DB] Double Dipping

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

[PHP-DB] Double Dipping

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

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

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

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

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

[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 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

[PHP-DB] Calculate a value during the SQL command

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

Re: [PHP-DB] Calculate a value during the SQL command

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

[PHP-DB] Updating multiple rows from a single form submission

2002-01-17 Thread John Hawkins
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

[PHP-DB] sorting on the first 8 digits....

2002-01-15 Thread John Hawkins
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

[PHP-DB] Weigting a random selection

2001-12-28 Thread John Hawkins
! 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