I have the a user table and a user's photo table. Each user has about 6 photos. I'm trying to set the user's main photo as the most recently added photo. On the page where the user's info and main photo is displayed I'm using:
SELECT
*
FROM users
LEFT JOIN users_photos
ON users.uid = users_photos.upuid
WHERE users.featured = 'yes'
AND users.type = 'Member'
GROUP BY
users_photos.upuid
ORDER BY users_photos.upTime DESC
However, the result doesn't give the most recently added photo. It results in the photo that isn't the oldest or newest but rather the middle photo.
I tried a number of different GROUP BY and ORDER BY but nothing.