How can I select the row with the highest id from all rows where the query conditions match?
for example this query:
SELECT * FROM tbl_pictures WHERE user='1' AND type='profilepic'
So if user1 already uploaded a few profile pictures, there will be couple rows which match the query. Since my tbl_pictures has an auto increment id i always want to get only the row which matches the query and has the highest index compared to the other matches.
How do I have to write that query?