Question: I am going to try and explain this the best way I can. I have a table called albumAccess which has the following fields : id, albumID, userID, and permission. 

Next I have another table that holds information for each album based off of the albumID. 

I want to know how I can use the userID to get all of the album information. I have been researching joins and php arrays but not sure how to go about doing it.

Any help will be appreciated!

Answer: 
I am taking the another table name as albumDetails that holds information for each album based off of the albumID.

```
select albumAccess.*, albumDetails.* from albumAccess, albumDetails where
albumAccess.albumID=albumDetails.albumID and 
albumAccess.userID=YOUR_REQUIRED_USER_ID

```
I think this is what you looking for.

SELECT \* FROM `users` u, `albuminfos` ai, `albumaccesses` aa WHERE aa.user\_id=u.id