Hi-- I have a simple mySQL problem--
I have two tables, one is a user's table, and one is a photos table (each user can upload multiple photos).
I'd like to write a query to join these tables, so I can pull all photos associated with a user (up to a certain limit).
However, when I do something obvious like this:
SELECT *.a, *.b FROM user_table a
JOIN photos_table b ON a.id = b.userid
it returns
a.id, a.name, a.email, a.address, b.id, b.userid, b.photo_title, b.location
but it only returns a single photo. Is there a way to return something like:
a.id, a.name, a.email, a.address, b.id, b.userid, b.photo_title, b.location, b.id2, b.photo_title2, b.location2 etc. . .
for a given LIMIT of photos?
Thanks for any ideas.