SELECT t1.id as album_id, t3.id as photo_id, t3.hash
FROM ow_photo_album t1
JOIN ow_protectedphotos_passwords t2 ON t2.albumId = t1.id
JOIN ow_photo t3 ON t3.albumId = t1.id
WHERE t1.userId = '$id'
AND t2.privacy = 'password'
ORDER BY t3.id ASC
what i need this for is to pull specific 2 collumns from the 3rd join that has to be filtered by the 2nd join.
I can pull these with {{$data->photo_id}}{{$data->hash}} wrapped in a '@foreach($photo_album as $data)' correct?
just do not know exactly how to convert this.. just now getting into laravel, so any help will be great.