I need to get two pieces of information from a table: the largest value from one field and the most recent entry. I don’t really care about all the other items. The two fields in question are score and whenadded. Is there a way to avoid doing two separate queries?
"SELECT score FROM scores ORDER BY score DESC limit 1" gives highest score.
"SELECT whenadded FROM scores ORDER BY whenadded DESC limit 1" gives most recent.
However, is there a way to do one query and grab these two pieces of info? Two queries seems excessive for such a small thing. Thanks
This should work.