MySQL Forums
Forum List  »  General

Comlicated SELECT statement. Help appreciated!
Posted by: Dan Dean
Date: March 13, 2005 03:14PM

I am having trouble with a SELECT statement. Here's what I want to do:

tbl1 is a list of photo albums, each with an 'album_id'.
tbl2 is a list of photos, with a column specifying the 'album_id' of the photo album it belongs to.

I want to SELECT a list of albums, and append to that list a column containing the number of photos in that particular album (determined by counting the number of photos that have an 'album_id' matching each album). How should I do this?

Thanks for your feedback.

Dan

Options: ReplyQuote


Subject
Written By
Posted
Comlicated SELECT statement. Help appreciated!
March 13, 2005 03:14PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.