$whatIsTaken = 'orderId IS NOT NULL OR (NOW()-clickTime<1200 AND clickTime IS NOT NULL) OR (SELECT COUNT(*) FROM queue WHERE queue.place = tickets.place) > 0';
$whatIsAvailable = 'orderId IS NULL AND (NOW()-clickTime>1200 OR clickTime IS NULL) AND (SELECT COUNT(*) FROM queue WHERE queue.place = tickets.place) = 0';
SELECT place FROM tickets WHERE (place IN ($preAvailables) AND ($whatIsTaken)) OR (place NOT IN ($preAvailables) AND ($whatIsAvailable))
desktopwidth:i:<value>
desktopheight:i:<value>
where <value> is the resolution, such as 1680 or 1050.
>как отличить обновление страницы от открытия новой
не помните чем дело кончилось?)