I have a mysql table named events. Some events are featured. I want to randomly display one of the two latest featured events. The field 'timestamp' holds the UNIX timestamp of the event's creation time.

The query looks like this now:

$query = "SELECT * FROM events WHERE featured = 1 ORDER BY timestamp DESC LIMIT 2;";

Is there a way to syntax the query to return just one of those two events and display it right away, or should I go around it with php?

What is recomended here?

Edit
Report