I'm trying to get last row of specific id in mysql. Let suppose i have a table user products
userProducts
id | user_id | products
1 | 12| Mouse
2 | 12| Keyboard
3 | 12| Laptop
4 | 12| Headphone
5 | 12| Webcame
I want to get last row Webcame of user_id=12
. Please guide me how can i customize this query for that.
select * from userProducts where user_id = 12