Inner joins are like learning German... difficult.
I have a table named 'photos' which looks like this:
Every photo has an id, the filename (fname), dir, owner (person that uploaded the photo) and a description.
Now I'm trying to send out notifications when a new comment is left for the person's photo which involves pulling their email address and the field to determine if they want notifications sent out.
I now need to do this SQL as well: select emailaddy, notify from userlist where username = 'clay70'
This will select the email address and notify value (yes/no) where username = (value of "owner" in the "photos" table) to see if the person wants a notification of new comment, and what email to send it to.
Basically something like this (and I know the SQL format is wrong wrong wrong):
select a.emailaddy, a.notify, b.fname, b.dir, b.owner, b.info from a.userlist b. photos where a.username = b.owner
I'm hoping you can see through my invalid SQL command and come up with what I'm looking for. I just need to join the username and owner from userlist and photos tables respectively.