I would like to know how to make a request that does this:
I have a table like this:
CREATE TABLE `sendingServers` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` text NOT NULL,
`address` text NOT NULL,
`token` text NOT NULL,
`lastPoll` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
And I would like to get the following:
- Select all servers where
lastPollless than X seconds ago - Then select a random entry from the return value
Is it possible? How do I achieve this?
source
share