At 10:55 AM +0000 3/29/02, DL Neil wrote:

>> Scenario:
>> - two tables, one for photos, and one for collections
>> - zero or more photos can belong to a collection
>> - the database may not know the collection_id requested
>>      (i.e. the user on the browser side did something to request
>>      a non-existent collection)

>The first observation is the way you have worded the join - I'm sure it
>will work when there is both collection and photo data, but to join the
>photo and collection tables it would be 'normal' to establish the
>relationship between their keys, eg:
[lots of good analysis]

Thanks much,  I will study this.

A lot of reading last night opened up the wonders of "JOIN".
I believe that I will pursue a LEFT JOIN (collection first),
and a count on a photo_id field.  That should give me
the cases I'm looking for.  I will follow up with my solution
in the next day or so.

As long as I am writing:  has anyone here taken the MySQL
class?  (http://www.mysql.com/training/curriculum.html)
It would seem to be a good, intensive week of training,
applicable to other DB's as well.


-- 
Daniel L. Smith - [EMAIL PROTECTED] - Sonoma County, CA
AIM: JavaE36M3  ICQ: 12834734
http://resume.daniel.org






---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to